Hi,
Wanted to create a windows console service that will run on the backend of a server to connect to my application and to Dynamics 365: Business Central.
Planning to use OAuth 2.0 client credentials to get token and consume business central endpoints.
Here are the following steps I have made so far:
App Registration to able to use client_ID
Client secret for client secret
Used grant type client_credentials to get access token
Used the following base addresses to test out the token access but none of them seems to work
https://login.microsoftonline.com/{client_id}/oauth2/v2.0/token
https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token
Also tried the postman example provided inthe documentation, they, however, will return a token but not the correct one as it is unauthorized
https://login.windows.net/{tenant}.onmicrosoft.com/oauth2/authorize?resource=https://api.businesscentral.dynamics.com
https://login.windows.net/{tenant}.onmicrosoft.com/oauth2/token?resource=https://api.businesscentral.dynamics.com
GetAccessToken code similar to this https://api.codeproject.com/Samples/ClientCredCsDoc
Would really appreciate help here




