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 access token expires every hour and we need to increase the access token's lifetime to expose ODATA URL( Webservice API)

(1) ShareShare
ReportReport
Posted on by 114

OAuth access token expires every hour and we need to increase the access token's lifetime to expose ODATA URL( Webservice API).

Steps followed,

Step1 : Registered a new app in Azure Portal.

Step 2: Authentication -> Web -> Added "Redirect URI" (https://businesscentral.dynamics.com/)

Step 3: Added App Permissions (Both Delegated and Application Permissions).

Step 4 : Added Client Secret.

Step 5: In BC, created an Azure Active Directory application with the same name of registered app from Azure portal.

Step 6: Added User Groups for this Azure AD application such that the User Permission set has been updated.

Step 7: Enabled the Azure AD Application. 

Step 8: After configuring the app and Azure AD Application, created new GET request in Postman app.

Step 9: Parameters required for OAuth 2.0 are passed in Postman app,

Parameters are,

Token Name, Grant Type, Access Token URL, Client ID, Client Secret, Scope, Client Authentication

Step 10: Generated new Access Token and using the token, I am able to get the data from the Webservice API.

Issue is, We have provided the ODATA URLs to expose the Webservice API to Java team in our organization such that the webservice key is going to be removed.

So we have provided the OAuth access token generated via Postman app to them. They are unable to use the same token after an hour since it expires.

Is there any way to set the expiry time of OAuth token ? Or is there any work around to access the Web Service API without Web service key.

I have the same question (0)
  • Suggested answer
    Andy Sather Profile Picture
    on at

    Hello,

    If you don't get further responses to this issue, you may want to raise a support request to Microsoft support via your CSP / Partner.

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi,

    Token expiry decided by Azure AAD, please refer the below link

    learn.microsoft.com/.../active-directory-configurable-token-lifetimes

    learn.microsoft.com/.../how-to-change-token-expiration-time-in-azure-porta.html

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

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans