question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[QUERY] Authentication using bearer token from AAD

See original GitHub issue

Query/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:closed
  • Created 4 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
gapra-msftcommented, Nov 23, 2019

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

1reaction
rickle-msftcommented, Nov 22, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Get Azure AD tokens for users by using MSAL - Microsoft Learn
You can use the Microsoft Authentication Library (MSAL) to acquire Azure Active Directory (Azure AD) access tokens programatically.
Read more >
Azure AD Access Tokens: Exploring Their Contents
Azure AD Access tokens are an important part of accessing data using modern authentication through APIs like the Microsoft Graph.
Read more >
Authentication API Explorer - Auth0
An example is the Get User Info endpoint. In this scenario, you get an Access Token when you authenticate a user, and then...
Read more >
How can I make Azure AD authentication accept an url query ...
If you're using the SignalR JavaScript client, you can provide a method which will return an access token, which will be included in...
Read more >
REST API Get Access Token - Microsoft Power BI Community
You need to specify your tenant_id in your URL, e.g. https://login.microsoftonline.com/{{tenant_id}}/oauth2/v2.0/token. You can find the tenant_id in the Azure ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found