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.

(0) 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
    2,772 Super User 2026 Season 1 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

     

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 June Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 686 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 447 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 328 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans