I have created an user-assigned identity using account A@hotmail.com and copied the clientid. After this I have assigned a role to this identity on a particular storage account. Also I have added this user-assigned identity to an azure function. Now I trying to execute some code through visual studio and my login account is B@hotmail.com. I have below piece of code
string userAssignedClientId = "<your managed identity client Id>";
var credential = new DefaultAzureCredential(new DefaultAzureCredentialOptions {ManagedIdentityClientId = userAssignedClientId });
var blobClient = new BlobClient(new Uri("https://myaccount.blob.core.windows.net/mycontainer/myblob"), credential);
Now my question is how DefaultAzureCredential will do authentication? Will it allow user with account B@hotmail.com to use clientid created using account A@hotmail.com