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

Failed to acquire access token as user opens OneDrive from BC OnPrem

(0) ShareShare
ReportReport
Posted on by 437

Hi All,

version: BC 19.0.29844.30666

deployment: OnPrem

authentication type: AD synched to AAD

issue: as user is opening his OneDrive from BC WebClient error pops: Failed to acquire access token

System configuration:

1. App is registered on Azure

2. all the permissions are applied on App

3. redirect URI is configured to point to the localhost of the NST server

4. client certificate is issued and secret is generated

5. setup on page "Microsoft Sharepoint Connection Setup" is configured as expected

  - for OneDrive integration

6. Self-signed certificate is issued and imported on the NST server

- permissions on the certificate are applied as expected (NST user has been granted with read and full permissions on the certificate)

7. NST is restarted

Question 1: Do I need to insert the certificate thumbprint in the NST config?

Question 2: Self-signed certificate is not uploaded to the App in Azure. Should I upload the certificate? 

Thanks Damjan

I have the same question (0)
  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    Question 1: Do I need to insert the certificate thumbprint in the NST config?

    Answer Microsoft:

    This is only required when authentication type is NavUserPassword / AccessControlService / UserName for NST. Only NavUserPassword / AccessControlService are considered to be classified as Modern Authentication. Microsoft recommends AccessControlService / Azure AD authentication. Since you mentioned you are using AD Synch Tool, I am pretty sure your company is using Azure AD authentication which is a great infrastructure choice with very limited administrative work.

    Question 2: Self-signed certificate is not uploaded to the App in Azure. Should I upload the certificate?

    Answer Microsoft:

    This is not required for the scenario to work.

    The failure to acquire access token is a generic error. It could be caused by many issues. You mentioned localhost as redirect uri. I am not in favor of using http://localhost. I am more in favor of using nav.domain.com:port/.../SignIn and nav.domain.com:port/.../OAuthLanding.htm. You can use a CNAME record to point nav.domain.com to the actual server or you can use an A-record in DNS.

    In customsettings.config file there are a couple of keys important (which usually are filled with wrong values when we see incoming support requests) when things do not work out of the box:

    1. PublicWebBaseUrl (must be httpS)

    2. ClientServicesFederationMetadataLocation

    3. WSFederationLoginEndpoint (no need to add wreplay value / wrealm should be similar to AppIdUri(

    4. ExtendedSecurityTokenLifetime

    5. AppIdUri (AppIdUri = wrealm = application client id (to be copied from Azure AD app registration)

    Hope it helps or gives you a good start.

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,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans