Hi,
I am trying to connect via OAuth2 to BC via a DW 9.12.3 site.
First I noticed that I need to be on a 9.12.0 version to get the option to add an Access Token in the authentication information. I started with a 9.10.12 site so I am hoping that this is something recently added.
In Postman I am able to connect with the following:
Token Name : Whateveryouwant
Grant Type: Client Credentials
Access Token URL: https://login.microsoftonline.com/d10e...bfdb7ae/oauth2/v2.0/token
Client Id: 5a1e.....XXX
Client Secret: XXX
Scope: https://api.businesscentral.dynamics.com/.default
Client Authentication: Send and Basic Auth Header
Using the above I am able to configure a new token and add that to the Bearer Access Token and authenticate.
That confirms the AAD Auth in BC and permissions across OAuth2. Taking the same credientails to the DW authentication endpoint I get the following error:
"AcquireTokenSilent failed. EndpointAuthentication id: 6. Error: No account or login hint was passed to the AcquireTokenSilent call."
Here is the OAuth2 authetication endpoint. How is the Authorization url being generated? I initally left the AccessToken blank and the Auth url generated the below:
https://login.microsoftonline.com/d10e1....fdb7ae/oauth2/v2.0/authorize?scope=https%3A%2F%2Fapi.businesscentral.dynamics.com%2F.default+offline_access+openid+profile&response_type=code&client_id=5a1e6....df9fde4e&redirect_uri=https%3A%2F%2Fint-swiftrizzo.mydwsite1.com%3A443%2FAdmin%2FPublic%2FModule%2FEndpointManagement%2FEndpointAuthorization.aspx&client-request-id=9f7d0...f40&x-client-SKU=MSAL.Desktop&x-client-Ver=4.22.0.0&x-client-CPU=x64&x-client-OS=Microsoft+Windows+NT+10.0.14393.0&prompt=select_account&state=https://int-swiftrizzo.mydwsite1.com:443/Admin/Module/IntegrationV2/EndpointManagement/EditEndpointAuthentication.aspx?builderId=d10e1c0c...STau9ncUOZ9iQ
Pasting in the AccessToken generated in Postman did not autheticate either. Has anyone hit this AquireTokenSiletFail?
Thanks,
Shawn Tehini