We built UserDesk with a zero-trust architecture. Even if our entire database were compromised, attackers cannot access your Microsoft 365 tenant.
UserDesk does not store Microsoft 365 passwords, admin credentials, or long-lived API keys. Authentication is handled entirely by Microsoft's OAuth 2.0 authorization code flow with PKCE. When a user signs in, they authenticate directly with Microsoft — UserDesk never sees or handles their password.
After authentication, Microsoft issues a short-lived access token (valid for ~1 hour) and a refresh token. These tokens are encrypted inside a signed JWT session cookie stored in the user's browser — not in our database.
Our database contains only subscription and portal metadata:
If an attacker gained full access to our database, they would find tenant IDs, email addresses, portal roles, and audit log entries. They would not find:
An attacker with our database alone cannot sign into your tenant, cannot call the Microsoft Graph API on your behalf, cannot reset passwords, and cannot read your users' data. The database is essentially a billing and audit ledger.
Here's the full authentication flow, step by step:
User clicks Sign in
The browser redirects to Microsoft's login page (login.microsoftonline.com). UserDesk never handles the password.
Microsoft authenticates the user
MFA, conditional access, and all your tenant's security policies apply. Microsoft issues an authorization code.
Code exchange (server-side)
Our server exchanges the authorization code for an access token and refresh token using our app's client credentials + PKCE. This happens server-to-server.
Session cookie created
The tokens are encrypted into a signed JWT and stored as an HttpOnly, Secure, SameSite cookie in the user's browser. The tokens never touch our database.
API calls use the user's token
When the user takes an action (e.g., reset a password), UserDesk calls the Microsoft Graph API using that user's access token. The action is performed as that user, with their permissions.
Token refresh
When the access token expires (~1 hour), UserDesk uses the refresh token to get a new one. This is transparent to the user.
Sign out
The session cookie is deleted. The tokens are gone. There is nothing persisted server-side to revoke.
UserDesk uses delegated permissions, not application permissions. This is a critical distinction:
This means UserDesk has zero standing access to your tenant. When no one is actively using the portal, there are no valid tokens and no way to access your data. The app cannot "phone home" or run background operations against your tenant.
During initial setup, a Global Admin approves the following Microsoft Graph permission scopes:
These scopes define the maximum set of actions the app can perform. Within UserDesk, the portal role system (Admin/Member/Viewer) further restricts what each individual user can do. A Viewer, for example, cannot take any write actions even though the permission scopes allow it.
Your Global Admin can revoke UserDesk's access at any time from the Azure Portal → Enterprise Applications → UserDesk → Properties → Delete. This immediately invalidates all tokens and removes the app's consent from your tenant. No data migration, no export needed — UserDesk doesn't hold any of your data.
If you have security questions or need additional detail for your compliance review, contact us at hello@getuserdesk.com. We're happy to walk through the architecture with your security team.
Connect your Microsoft 365 tenant in under 2 minutes. Your data stays in your tenant — we just help your team manage it.