Tutorial: Enforce multifactor authentication for B2B guest users
Applies to: Workforce tenants External tenants (learn more)
When collaborating with external B2B guest users, it’s a good idea to protect your apps with multifactor authentication policies. Then external users need more than just a user name and password to access your resources. In Microsoft Entra ID, you can accomplish this goal with a Conditional Access policy that requires MFA for access. MFA policies can be enforced at the tenant, app, or individual guest user level, the same way that they're enabled for members of your own organization. The resource tenant is always responsible for Microsoft Entra multifactor authentication for users, even if the guest user’s organization has multifactor authentication capabilities.
Example:
- An admin or employee at Company A invites a guest user to use a cloud or on-premises application that is configured to require MFA for access.
- The guest user signs in with their own work, school, or social identity.
- The user is asked to complete an MFA challenge.
- The user sets up MFA with Company A and chooses their MFA option. The user is allowed access to the application.
Note
Microsoft Entra multifactor authentication is done at resource tenancy to ensure predictability. When the guest user signs in, they'll see the resource tenant sign-in page displayed in the background, and their own home tenant sign-in page and company logo in the foreground.
In this tutorial, you will:
- Test the sign-in experience before MFA setup.
- Create a Conditional Access policy that requires MFA for access to a cloud app in your environment. In this tutorial, we’ll use the Windows Azure Service Management API app to illustrate the process.
- Use the What If tool to simulate MFA sign-in.
- Test your Conditional Access policy.
- Clean up the test user and policy.
If you don’t have an Azure subscription, create a free account before you begin.
Prerequisites
To complete the scenario in this tutorial, you need:
- Access to Microsoft Entra ID P1 or P2 edition, which includes Conditional Access policy capabilities. To enforce MFA, you need to create a Microsoft Entra Conditional Access policy. MFA policies are always enforced at your organization, regardless of whether the partner has MFA capabilities.
- A valid external email account that you can add to your tenant directory as a guest user and use to sign in. If you don't know how to create a guest account, see Add a B2B guest user in the Microsoft Entra admin center.
Create a test guest user in Microsoft Entra ID
Tip
Steps in this article might vary slightly based on the portal you start from.
Sign in to the Microsoft Entra admin center as at least a User Administrator.
Browse to Identity > Users > All users.
Select New user, and then select Invite external user.
Under Identity on the Basics tab, enter the email address of the external user. Optionally, include a display name and welcome message.
Optionally, you can add further details to the user under the Properties and Assignments tabs.
Select Review + invite to automatically send the invitation to the guest user. A Successfully invited user message appears.
After you send the invitation, the user account is automatically added to the directory as a guest.
Test the sign-in experience before MFA setup
- Use your test user name and password to sign in to the Microsoft Entra admin center.
- You should be able to access the Microsoft Entra admin center using only your sign-in credentials. No other authentication is required.
- Sign out.
Create a Conditional Access policy that requires MFA
Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
Browse to Protection > Conditional Access > Policies.
Select New policy.
Give your policy a name, like Require MFA for B2B portal access. We recommend that organizations create a meaningful standard for the names of their policies.
Under Assignments, select Users or workload identities.
- Under Include, choose Select users and groups, and then select Guest or external users. You can assign the policy to different external user types, built-in directory roles, or users and groups.
Under Target resources > Resources (formerly cloud apps) > Include > Select resources, choose Windows Azure Service Management API, and select Select.
Under Access controls > Grant, select Grant access, Require multifactor authentication, and select Select.
Under Enable policy, select On.
Select Create.
Use the What If option to simulate sign-in
On the Conditional Access | Policies page, select What If.
Select the link under User.
In the search box, type the name of your test guest user. Choose the user in the search results, and then choose Select.
Select the link under Cloud apps, actions, or authentication content. Choose Select resources, and then choose the link under Select.
On the Cloud apps page, in the applications list, choose Windows Azure Service Management API, and then choose Select.
Choose What If, and verify that your new policy appears under Evaluation results on the Policies that will apply tab.
Test your Conditional Access policy
Use your test user name and password to sign in to the Microsoft Entra admin center.
You should see a request for more authentication methods. It can take some time for the policy to take effect.
Note
You also can configure cross-tenant access settings to trust the MFA from the Microsoft Entra home tenant. This allows external Microsoft Entra users to use the MFA registered in their own tenant rather than register in the resource tenant.
Sign out.
Clean up resources
When no longer needed, remove the test user and the test Conditional Access policy.
Sign in to the Microsoft Entra admin center as at least a User Administrator.
Browse to Identity > Users > All users.
Select the test user, and then select Delete user.
Sign in to the Microsoft Entra admin center as at least a Conditional Access Administrator.
Browse to Protection > Conditional Access > Policies.
In the Policy Name list, select the context menu (…) for your test policy, and then select Delete. Select Yes to confirm.
Next step
In this tutorial, you created a Conditional Access policy that requires guest users to use MFA when signing in to one of your cloud apps. To learn more about adding guest users for collaboration, see Add Microsoft Entra B2B collaboration users in the Microsoft Entra admin center.