A cloud-based identity and access management service for securing user authentication and resource access
Adding to the earlier replies on your two follow-up questions,
1. Matching the Entra identity to the CRM user: use the guest's object ID, not the email
Since your CRM is the source of authorization and you invite every contractor, create the invitation from your onboarding process with Microsoft Graph (POST /invitations, permission User.Invite.All). The response returns the guest user object that was created in your tenant:
"invitedUser": {
"id": "cbb896f9-8306-49d0-b56b-b8e39cd28825",
"userPrincipalName": "contractor_gmail.com#EXT#@yourtenant.onmicrosoft.com"
}
Store invitedUser.id on the CRM record. When the contractor signs in to your app, the token issued by your tenant carries that same value in the oid claim, whichever way they signed in: Gmail through Google federation, Email OTP, or a personal Microsoft account. So match on oid (plus tid for your tenant).
Don't match on the email or UPN claims. The address can differ from what's in the CRM, and the UPN of a guest is a generated #EXT# value.
The same API also handles the "wrong account type" cases. If a contractor redeemed with the wrong identity, for example a personal Microsoft account instead of Email OTP, you can reset their redemption with "resetRedemption": true and the existing invitedUser.id. The object ID, and therefore your CRM link, stays the same.
2. Which second factor does an Email OTP guest use?
For guests who don't sign in with a Microsoft Entra work account (Email OTP, Google, and personal Microsoft accounts), MFA always happens in your tenant. With a Conditional Access policy that uses the Require multifactor authentication grant, the guest registers MFA in your tenant on first sign-in. Your tenant then challenges them on later sign-ins, using whichever of your enabled methods they register: Microsoft Authenticator push notifications, SMS, voice call or an OATH software token. The email code is their first factor and doesn't count as MFA.
Two limits to plan for:
- Authentication strength only applies to external users who sign in with Microsoft Entra ID. For Email OTP, SAML/WS-Fed and Google federation users, Microsoft says to use the MFA grant control instead.
- Even for Entra guests completing MFA in your tenant, methods such as FIDO2 keys, Windows Hello and phone sign-in only count in their home tenant. So "Microsoft Authenticator (push) for everyone" is the method you can rely on across all contractor types.
That gives you one consistent flow: CRM-approved contractor → Graph invitation (store invitedUser.id) → any supported sign-in → MFA registered in your tenant → app authorizes on oid against the CRM.