Search code examples
azure-active-directorymulti-tenant

Multitenant signon issue with asp.net core


I have enabled my application as multi-tenant and deployed it on one Azure tenant. Now there are 3 tenants with ADs I want all users from these ADs to be able to login to my app. 2 Ads are working fine but for one Ad user I am getting below error. What to do?

Need admin approval Tenant1 Tenant1 needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it. Have an admin account? Sign in with that account Return to the application without granting consent.


Solution

  • Yeah correct, You may not assign permission for that. To allow this consent you need to have permission on your portal. As you many know there are two kind of permission

    1. Delegated permissions Required when user need to access resources.

    2. Application permissions When application request for accessing resource.

    Set Permission on Portal:

    You can set your application and delegated permission from azure portal.

    Steps

    1. Login in to Azure portal
    2. click on Active directory
    3. App Registrations
    4. Select Your apps
    5. Settings
    6. Required permissions

    see the below screen shot for better idea

    enter image description here

    Note: Particularly for your case I would suggest you to check this docs

    If you still have any problem feel free to share here in comment. Thank you.