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

Notifications

Announcements

No record found.

Community site session details

Community site session details

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

OAuth 2.0 - grant_type - client_credentials - not supported in BC SAAS

(0) ShareShare
ReportReport
Posted on by 10

Hello Community,

I can get the access token from grant_type - authorization_code and call the BC Saas API to retrieve the data. but this method needs user interaction to get the highlighted code value using the below code.

login.microsoftonline.com/.../authorize
client_id=6731de76-14a6-49ae-97bc-6eba6914391e
&response_type=code
&redirect_uri=http%3A%2F%2Flocalhost%2Fmyapp%2F
&response_mode=query
&scope=openid%20offline_access%20https%3A%2F%2Fgraph.microsoft.com%2Fmail.read
&state=12345

 and no 3rd party will accept this option to acquire the code value. 

pastedimage1616519306241v2.png

as an alternate option used client_credential to get the access token as below

pastedimage1616519863080v3.png

but the access_token retrieved from client_credentials throws the below error, if I use this token to call the BC API

pastedimage1616520302006v4.png 

There is no proper documentation to move forward. 

Any suggestion will be really helpful. 

I have the same question (0)
  • Suggested answer
    raelhefn Profile Picture
    on at
  • bc-developer Profile Picture
    10 on at

    Hello,

    Thanks for the response.

    Documents explain about grant_type - authorization_code which is working but not feasible for the business scenario. reason: only with user interaction this method gets the authorization_code refer my first screenshot  

  • tjk Profile Picture
    15 on at

    Did you ever solve this issue? I'm having the same.

  • Community Member Profile Picture
    on at

    Same problem here, did you finally resolve the issue?

  • Alberto Zamburlini Profile Picture
    39 on at

    Same problem here, did you finally resolve the issue?

  • Alberto Zamburlini Profile Picture
    39 on at

    I solved any problems after follow this guide

    www.kauffmann.nl/.../

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,143

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,694 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,067 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans