-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
The get_token docs for DefaultAzureCredential (as well as all other credential classes) have a prominent callout that reads This method is called by Azure SDK clients. It isn't intended for use in application code.
This is mostly true when working exclusively with Azure SDK clients, but is very misleading for developers who need to use the credential objects to obtain tokens for other scenarios. A dev on my team just burned a day because he thought that we shouldn't be using DefaultAzureCredential in our codebase to auth from our CLI -> API
Some examples of valid usage that the current docs discourage:
- Obtaining an AAD token for authentication against Azure SQL
- Using an AAD token to authenticate against your own services configured w/ OAuth2
The Java and JS libraries do not contain this warning. There is a corresponding issue in the .NET repo slated for 2020 October here: Azure/azure-sdk-for-net#13531
Can we please remove this warning and/or align with the other languages to make its true intent more clear?