Reputation: 305
With reference to Azure Managed Service Identity docs for AppServices I have below questions.
Upvotes: 0
Views: 293
Reputation: 31414
- If I use REST API to get the access token, how long I can cache that token before getting a new token for the same resource?
The lifetime of the access token depends on what you set for your Tenant. And in default, it's an hour. But for the Managed Identity Service Principals, it does not support to configure the token lifetimes, so it's still the default time: an hour.
Note that currently we do not support configuring the token lifetimes for Managed Identity Service Principals.
You can get more details here.
- There is an Azure SDK also to get the token; Does that cache tokens internally?
The Azure SDK just provides the way to get the token and you need to keep it yourself. The SDK will not keep it.
Upvotes: 1