Open benprofessionaledition opened 1 day ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Thanks for reaching out.
Please refer https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/identity/azure-identity/TOKEN_CACHING.md for samples how to authenticate a user silently.
Hi @benprofessionaledition. 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.
azure.identity
Describe the bug When instantiating a
DeviceCodeCredential
usingTokenCachePersistenceOptions
, nothing appears to be cached and I need to re-authenticate using the device code flow every time.To Reproduce The following script is a minimal example using AzureML. It prompts for a Device Code and then logs in.
Expected behavior I would expect that running this script a second time, or instantiating a new DeviceCodeCredential and getting a token from it, would not request authentication again.
Screenshots n/a
Additional context I have scoured every single available resource online, including documentation and the source code and cannot figure out how to actually cache these credentials/tokens/authorization records/whatever it is that's necessary to prevent having to log in every single time. I am fine using a different credential type if the cache exists, however
DefaultAzureCredentials
uses a different tenant ID, and seemingly continues to do so even if I specify the tenant ID in the constructor.