web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

Authorization Flow Callback Error

(2) ShareShare
ReportReport
Posted on by 118
When I redirect my user to `https://login.microsoftonline.com/common/oauth2/v2.0/authorize` for OAUTH2 authorization flow. Im receiving a callback error "invalid_request" with description "AADSTS1000031: Application <App Name> cannot be accessed at this time. Contact your administrator". Any one have encountered and resolved this kind of issue been trying to solve this for days. I already tried removing the user's permission one by one but Im unable to reproduce it. This is fully working for most of our customers except for this one particular customer. Thank you in advance!
I have the same question (0)
  • Suggested answer
    Sohail Ahmed Profile Picture
    11,095 Super User 2025 Season 2 on at
    Authorization Flow Callback Error
    Maybe this will help point you in the right direction.
     
    The error AADSTS1000031: Application cannot be accessed at this time usually means that:
     
    The Azure AD app registration is not properly configured or
     
    The user/account doesn’t have consent or permissions to access the app.
     
     
    Try the following:
     
    1. Verify App Registration
     
    Make sure the app is not disabled in Azure Portal.
     
    Ensure it is multi-tenant if you're using /common/ in the URL.
     
     
     
    2. Check API Permissions
     
    Go to Azure > App Registrations > Your App > API permissions.
     
    Confirm that Delegated permissions are added and admin consent is granted.
     
     
     
    3. Consent Flow
     
    Try accessing with a global admin first to provide initial consent, especially for multi-tenant apps.
     
     
     
    4. Avoid Using /common/
     
    If possible, replace /common/ with your actual tenant ID in the authorize URL to avoid tenant mismatch issues.
     
     
     
     
    Let me know if you'd like help reviewing your app registration.
     
    Mark below checkbox to make this answer Verified if it helps you.
     
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    19,359 Super User 2025 Season 2 on at
  • Gerardo Rentería García Profile Picture
    23,590 Most Valuable Professional on at
    Authorization Flow Callback Error

    Hi, good day
    I hope this can help you, and give you some hints.

    Azure AD SSO Guest user can't login - Stack Overflow

    An AADSTS1000031 error · Issue #41 · microsoft/cross-tenant

    Best Regards
    Gerardo

  • CU07100202-0 Profile Picture
    118 on at
    Authorization Flow Callback Error
    Thank you for all the responses. Will take a look on those suggestions. Note that its already working for most of our customers only on this one particular customer that its not working.
  • CU07100202-0 Profile Picture
    118 on at
    Authorization Flow Callback Error
    Hello, unfortunately, none of the suggestions worked. Still open for any suggestions. TIA!
  • Suggested answer
    YUN ZHU Profile Picture
    93,325 Super User 2025 Season 2 on at
    Authorization Flow Callback Error
    Hi, hope the following can give you some hints.
    Using OAuth to connect Business Central APIs and Web Service in Postman
     
    Thanks.
    ZHU
  • CU07100202-0 Profile Picture
    118 on at
    Authorization Flow Callback Error
    Thank you @YUN ZHU, however, I still can not reproduce the error. Please note that this is working with our other customers.
  • Suggested answer
    Pallavi Phade Profile Picture
    2,338 on at
    Authorization Flow Callback Error
    Greetings !

    Seems that the Azure AD (Microsoft Entra ID) application you're trying to use in your OAuth2 flow is either misconfigured or restricted
     
    1) Check Admin Center , Check Azure App is properly setup in azure active directory applications with D365 API permssion for user in BCE

    Correct Authorization url
    https://login.microsoftonline.com/<tenant_id>/oauth2/v2.0/authorize?
    client_id=<your_client_id>
    &response_type=code
    &redirect_uri=<your_redirect_uri>

    or

    2) In Azure Portal
    Under API Permissions , Add BCE Permissions and Grant admin consent for Tenant

    or

    3) In Azure Portal 
    Check you have provided multi-tenant access in authentication part

    Make sure that the client_id, redirect_uri, and scope values exactly match what's configured in your Azure App Registration.

    If this solution resolves your issue, kindly mark the answer as Verified for future reference.

    Regards
    Pallavi Phade

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,762

#2
Sumit Singh Profile Picture

Sumit Singh 2,573

#3
YUN ZHU Profile Picture

YUN ZHU 1,930 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans