You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When I call an Azure SDK from a project integrated with Microsoft.Identity.Web, I can use a simple pattern of providing a "token credential" object to the client constructor, and the rest is handled for me (in this case, the TokenAcquisitionTokenCredential. For example:
BlobClient blob = new BlobClient(new Uri(blobUrl), new TokenAcquisitionTokenCredential(_tokenAcquisition));
string blobContent = blob.DownloadContent().Value.Content.ToString();
This works great when I want to call the Azure SDK as the user who called my Web App.
But when I want to call the Azure SDK using the identity of the Web App itself, I don't have such a convenient mechanism available.
Describe the solution you'd like
I propose that we provide an additional "token credential" class that will request tokens using the web app's app identity. This would be almost identitical to the existing TokenAcquisitionTokenCredential class, but would leverage the already existing GetAuthenticationResultForAppAsync() method exposed by the ITokenContext interface.
Describe alternatives you've considered
One alternative approach might be to add a constructor parameter to the existing TokenAcquisitionTokenCredential class that signaled the instance to request tokens as the app.
Additional context
I have submitted a PR that encapsulates this proposal: #1722
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
When I call an Azure SDK from a project integrated with Microsoft.Identity.Web, I can use a simple pattern of providing a "token credential" object to the client constructor, and the rest is handled for me (in this case, the TokenAcquisitionTokenCredential. For example:
This works great when I want to call the Azure SDK as the user who called my Web App.
But when I want to call the Azure SDK using the identity of the Web App itself, I don't have such a convenient mechanism available.
Describe the solution you'd like
I propose that we provide an additional "token credential" class that will request tokens using the web app's app identity. This would be almost identitical to the existing TokenAcquisitionTokenCredential class, but would leverage the already existing GetAuthenticationResultForAppAsync() method exposed by the ITokenContext interface.
Describe alternatives you've considered
One alternative approach might be to add a constructor parameter to the existing TokenAcquisitionTokenCredential class that signaled the instance to request tokens as the app.
Additional context
I have submitted a PR that encapsulates this proposal: #1722
The text was updated successfully, but these errors were encountered: