[QUERY] Authentication using bearer token from AAD
See original GitHub issueQuery/Question
V8 SDK has a class com.microsoft.azure.storage.StorageCredentialsToken
which can be used for authentication with an existing bearer token from active directory like below:
StorageCredentials creds = new StorageCredentialsToken("<account_name>", "<access_token>");
CloudBlobClient client = new CloudBlobClient(<storageEndpoint>, creds);
Is there something similar in V12 SDK? One option is to implement TokenCredential
interface, but this interface needs the token to be wrapped in reactor framework type Mono
and I’d prefer keeping my application code free of frameworks used by the SDK and also I’m using only the sync APIs but forced to deal with async artifacts.
Why is this not a Bug or a feature Request? I don’t know if there is already something in place to do what I asked and if there isn’t, I can raise a feature request.
Setup (please complete the following information if applicable):
- OS: Linux
- IDE : IntelliJ
- Version of the Library used: 12.0.0
Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Query Added
- Setup information Added
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Hi @SukruthKS, It looks like there is no current implementation of TokenCredential that only accepts a bearer token. I’ve put in a feature request to the identity team, and the work should be tracked here https://github.com/Azure/azure-sdk-for-java/issues/6525
Sorry, @SukruthKS, for closing the issue prematurely. We are following up with the Identity and Core teams to confirm if this option is indeed missing, and if so, which team should pick it up. We will follow up with more information soon.