-
Notifications
You must be signed in to change notification settings - Fork 25
How to: Make my Azure web application multi tenant
You can register your web application in Azure Active Directory (AD) so it can access resources secured by the directory. By default, you can only use the web application with user accounts that belong to the same tenant where you registered the web application.
However, chances are that you want to make your application available to users in other tenants. If you look at the Configure page of the web application in Azure, you'll notice two key settings:
- Application is multi-tenant
- App ID URI
The first one is self-explanatory, but whether you can enable the multi-tenant setting depends on the second one. To be able to make the application multi-tenant your App ID URI must be in a verified custom domain.
Fortunately, every Azure AD has a verified domain at onmicrosoft.com that we can use. This means that you can use any URI in my_tenant.onmicrosoft.com as the App ID URI value. For example, you can use
https://my_app.my_tenant.onmicrosoft.com
or
https://my_tenant.onmicrosoft.com/my_app
Save the application configuration after assigning one of these values to App ID URI. Now you can enable the Application is multi-tenant switch and save the configuration once again.
Your web application is now ready to accept users from other tenants in Azure.
Happy coding!