Search code examples
azureoauth-2.0oauthmulti-tenant

multitenant authenticate issue in oauth1


I have multi tenant app in azure. I have given below permissions.

enter image description here

But i am getting this error. I tried few ways to give permissions but not working.

enter image description here

access token not generating.

If i use this URL this work fine. https://login.microsoftonline.com/common/oauth2/v2.0/authorize

But I have to use below. Because v2.0 not supported my app. https://login.microsoftonline.com/common/oauth2/authorize

is there any solution for this.


Solution

  • • You are receiving this error because an administrator has still not granted permission to the application’s request to access the required data of the user. You can grant admin consent to the request by navigating to the tenant where this application is registered. Then go to Azure AD --> App registrations --> Select the application --> API Permissions (Under Manage section) --> Check the permissions with warning sign on it and click on ‘Grant admin consent for ‘tenant_name’’ option above.

    • Also, then go to Enterprise applications in Azure AD --> Select the application --> Permissions (Under Security) --> Click the option ‘Grant admin consent for ‘tenant_name’’ under Admin consent tab. Please find the below screenshots for reference: - Application permissions Enterprise application permission

    This will ensure that the admin consent requests by the application through the user to be logged in will be aptly consented to and permission will be granted to the application for accessing the resources in the tenant.

    Also, please make sure that the below settings exist in your application manifest for application registrations, i.e., the accessTokenAcceptedVersion should be '2' in your app manifest.

    Accepted token version

    Please refer this documentation link for reference: -

    https://learn.microsoft.com/en-us/azure/active-directory/manage-apps/grant-admin-consent