azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[QUERY] How to create a blob client using EntraAppIds with Federated credentials?

Open eddynaka opened this issue 1 year ago • 5 comments
trafficstars

Library name and version

Azure.Storage.Blob

Query/Question

Hello!

Given an Azure Entra App Id with federated credentials, how do I properly create it and use it to connect into AzureStorage accounts to successfully create a blobclient?

I tried to use the DefaultAzureCredentials with the ClientId from my app, but I'm not sure if my issuer was right, since I didn't find any documentation.

Environment

No response

eddynaka avatar May 15 '24 21:05 eddynaka

Thank you for your feedback. Tagging and routing to the team member best able to assist.

jsquire avatar May 16 '24 13:05 jsquire

Hi @eddynaka - Could you describe more about how you are configuring your credential and what specific errors you are getting?

christothes avatar May 16 '24 14:05 christothes

Hi @eddynaka. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] avatar May 16 '24 14:05 github-actions[bot]

Hello @christothes ,

Since there is not much documentation available, here is what I did:

  1. Created an Entra App
  2. Created a federated credential with the following options: Other, Issuer=https://[Instance]/[Domain]/{TenantId}/v2.0/, Subject=AppId
  3. Gave Blob Owner permission to the entra app
  4. Tried to create using DefaultAzureCredentials with the ClientId to authenticate to the blob

Given those steps, it fails with either issuer not found or unauthorized. I also tried to use MSAL but didn't work as well.

eddynaka avatar May 16 '24 19:05 eddynaka

What is the issuer you are using for the federated credential? That issuer should have the details for you to fill in.

Regarding documentation - here are the general docs for configuring this - https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation

christothes avatar May 16 '24 20:05 christothes

Hi @eddynaka. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] avatar Jun 11 '24 20:06 github-actions[bot]

Hi @eddynaka, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

github-actions[bot] avatar Jun 18 '24 21:06 github-actions[bot]