In this section, we'll reconfigure the application to work as a multi-tenant application that you can use from other Azure AD tenants or a Microsoft personal account. With the following configuration we migrate the application:
- Open the Startup.cs file in your solution:
- Comment the ConfigureAuth(app) line
- Uncomment the ConfigureMultitenantAuth(app) line:
Modifying the code for multi-tenant usage
- Change the ida:TenantId value to our Azure AD domain name:
Changing the tenant ID
- Press F5 in Visual Studio to build and run the app.
- A new app will be available in Azure AD, but the users don't have roles assigned:
Check the role assignment for the newly created app
- Reassign the roles to the users:
Reassign roles
- Test logging in with your users and check the application.
- Test logging in with a user from...