1
votes

I am connecting to dynamics using below steps specified in link. The process is to call API and acquire token before we call actual api to dynamics with token value. This token expire every hour and i have to generate token every time

https://www.ashishvishwakarma.com/Dynamics-365-Single-Tenant-Server-2-Server-Authentication-Azure-Active-Directory-Access-Token/

The basic steps is to create azure app and create secret and give required permission. Is there any way where i can configure static token in azure app registration and i use the same everytime while communicating with dynamics. I dont want token to expiry.

any help would be appreciated.

1
Hi, @Kantaben Patel , Did this solve your problem?Carl Zhao
@CarlZhao Not yetKantaben Patel

1 Answers

0
votes

There is no way to configure a static token in Azure AD. Based on security considerations, the lifetime of an access token is about 1 hour, and the token will expire after 1 hour.

So if you want to obtain an access token that never expires, you need to use powershell to create a token lifetime policy, and then assign the policy to the service principal to set the token lifetime.