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.