azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

Token for Storage Account- Managed Identity

Open pradeepkumarms opened this issue 2 years ago • 2 comments

Library name and version

Azure.Identity Version=1.5.0.0

Query/Question

We are looking for an option to a get new token for each request.

Currently, if a token is issued and there are any further requests to get token till the time first token is valid, we are getting the same token that was issued earlier.

 var authResult = new DefaultAzureCredential(true).GetToken(new TokenRequestContext(
            new[] { "https://storage.azure.com/.default" })); 

We are using below

Azure.Identity Version=1.5.0.0 Microsoft.Azure.Storage.Common, Version=11.2.3.0

Environment

No response

pradeepkumarms avatar Jan 03 '23 08:01 pradeepkumarms

//cc: @schaabs

jsquire avatar Jan 03 '23 13:01 jsquire

Thank you for your feedback. Tagging and routing to the team member best able to assist. Please expect delayed responses due to the US holidays.

jsquire avatar Jan 03 '23 13:01 jsquire

Hi @pradeepkumarms - Clients have no control over whether the AAD authority issues a new token or the existing one. Generally it will be renewed only 5 minutes or so before expiration, but that is not guaranteed.

christothes avatar Feb 03 '23 17:02 christothes

Hi @pradeepkumarms. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

ghost avatar Feb 03 '23 17:02 ghost

Hi @pradeepkumarms, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

ghost avatar Feb 10 '23 22:02 ghost