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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

code":"Authentication_InvalidCredentials",The server has rejected the client credentials.

(2) ShareShare
ReportReport
Posted on by 21
Hi Everyone.

The endpoint calls failed due to the Expired Secret Key. I have created a new Secret Key from the Portal. And Now the Token is getting created. 
But throws this error for the API Calls. I have verified that the client Credentials are configured correctly for authentication.
Also in Business Central Entra app.

Would really appreciate your help in this issue.

Thanks
I have the same question (0)
  • Suggested answer
    Grigorios Mavrogeorgis Profile Picture
    3,096 Super User 2026 Season 2 on at
    Hi,
    yeah that's right, and it's probably the missing piece here. Getting a token back doesn't mean it's the right token, BC will happily reject a perfectly valid AAD token if the audience isn't right. Scope needs to be https://api.businesscentral.dynamics.com/.default, not the Graph default or something copied from another integration, that's the mistake I've seen most.
    Second thing, separate from the token itself, is the Entra Applications page in BC. Search that in Tell Me. The Client ID entry there needs to be Enabled and have a permission set actually assigned to it, rotating the secret in Azure doesn't touch that record at all so if it was already fine before it should still be fine now.

    If the scope and the BC-side app record both check out, then look at the actual response, 401 usually means the token itself is wrong (audience/scope), 403 means the token's fine but the identity behind it has no rights.
     
    Glad to help - follow up if anything is unclear.  
    â–º  If this solved it, marking it verified helps others too.      
    Regards,
    Grigorios Mavrogeorgis
    Business Central Consultant & AL Developer

    Work: Gmsoft Limited
    Blog:  insidebusinesscentral
    LinkedIn: linkedin.com/in/gregorymavrogeorgis

     
  • Suggested answer
    YUN ZHU Profile Picture
    102,765 Super User 2026 Season 2 on at
    Have you tested it using tools like Postman? I just ran a test and it worked fine, so this is likely still a configuration issue.
    More details: Using OAuth to connect Business Central APIs and Web Service in Postman
     
    Thanks.
    ZHU
  • Suggested answer
    OussamaSabbouh Profile Picture
    18,805 Super User 2026 Season 2 on at
    Hello,
    Since the token is being generated, the new secret is most likely valid; the failure is usually related to the token or Business Central authorization. Verify that you copied the Secret Value, not the Secret ID, request the token using the scope https://api.businesscentral.dynamics.com/.default, send it as Authorization: Bearer <token>, and confirm that the Entra app has Dynamics 365 Business Central – API.ReadWrite.All application permission with consent granted. In Business Central, also confirm that the same Client ID exists under Microsoft Entra Applications, is enabled, and has the required permission sets for the company/data being accessed. Please share the exact HTTP status and error message, because a 401 normally points to the token, tenant, audience, or authorization header, while a 403 usually means the app is authenticated but lacks Business Central permissions.
    Regards,
    Oussama Sabbouh
  • Suggested answer
    ALI NASIK Profile Picture
    32 on at

    Since you're able to generate the token with the new client secret, your authentication appears to be working. I'd also recommend checking that:

    The Microsoft Entra application is properly registered and the required API permissions have been granted.
    The application has been configured correctly in Business Central.
    The user you're using has a valid Business Central license assigned and the necessary permission sets.
  • Gerardo Rentería García Profile Picture
    27,611 Super User 2026 Season 2 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 524 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 399 Super User 2026 Season 2

#3
Grigorios Mavrogeorgis Profile Picture

Grigorios Mavrogeorgis 354 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans