0

we have a Java Application which needs to use the Dynamics Web API.

Right now we are using the non-interactive user authentication approach. (We have an Active Directory user which is set to non-interactive with an email and password).

This works fine, but it seems the Token expires (as it should do of course).

We were wondering if there is an API key approach - which does not expire?

We are aware of the "Server 2 Server Authentication", registering the App in Azure and creating a key with permissions to the Dynamics Web Api, but this also only gets us a token which expires, correct?

Thanks for the clarification!

HideAndSeek
  • 374
  • 3
  • 16
  • 1
    I believe currently no other way. You will need to handle expiring Token and generating new one in your code. – AnkUser May 14 '19 at 06:35
  • 1
    If it's Dynamics 365 Online you can look into creating an [Application User](https://learn.microsoft.com/en-us/dynamics365/customer-engagement/admin/create-users-assign-online-security-roles#create-an-application-user). – Aron May 14 '19 at 16:17
  • @AnkUser Okay. This is also our understanding. We will look into this. Should not be too hard. – HideAndSeek May 15 '19 at 13:08
  • @Aron we are aware of this. But it seems it still only returns tokens which expire. – HideAndSeek May 15 '19 at 13:08
  • Cool. As far as I know, all tokens will expire. The only "non-expiring" access is a username and password, and even that times out eventually in the browser. You might want to look into a [token cache](https://learn.microsoft.com/en-us/azure/architecture/multitenant-identity/token-cache). – Aron May 15 '19 at 14:27

0 Answers0