Issuer validation failed. Issuer did not match.
See original GitHub issueDescribe the bug When trying retrieve blob data from the azure storage I get an error
Expected behavior Being authenticated and retrieving data
Actual behavior (include Exception or Stack Trace) Status: 403 (Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.) ErrorCode: AuthenticationFailed
In fiddler I can see: Issuer validation failed. Issuer did not match.
To Reproduce Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
environment variable: AZURE_USERNAME: {my azure ad account logged into visualstudio that does work for sqlconnections for example}
new BlobServiceClient(new Uri(configuration.GetConnectionString("AzureStorage")), new DefaultAzureCredential());
var container = blobServiceClient.GetBlobContainerClient("apk");
foreach (var blob in container.GetBlobs()) //fails at .GetBlobs()
Environment:
- Name and version of the Library package used:
- Azure.Identity 1.1.1
- Azure.Storage.Blobs 12.3.0
- Hosting platform or OS and .NET runtime version (
dotnet --info
output for .NET Core projects): Windows 10 - IDE and version : [e.g. Visual Studio 16.3]
Issue Analytics
- State:
- Created 4 years ago
- Comments:32 (9 by maintainers)
Top Results From Across the Web
Azure storage account rejects the issuer of a managed ...
AdditionalDetails complain that AuthenticationErrorDetail: Issuer validation failed. Issuer did not match. When decoding the failing jwt token, ...
Read more >App Service – 'Issuer validation failed' – Troubleshooting
Issuer: '[PII is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. Did not match: validationParameters.
Read more >IDX10205: Issuer validation failed. Issuer - Microsoft Q&A
IDX10205: Issuer validation failed. Issuer: '[PII is hidden]'. Did not match: validationParameters.ValidIssuer: '[PII is hidden]' or ...
Read more >"JWT validation failed: Issuer validation failure" - Error
While trying to access an Azure function via a client application, I encountered an error in function authentication as "JWT validation ...
Read more >Doh! Built-in App Service Identity Provider Not Working!
"message": "IDX10205: Issuer validation failed. Issuer: '[PII is hidden]'. Did not match: validationParameters.ValidIssuer: '[PII is ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Expecho - I did not open a new issue, but I managed to solve the issue.
In my case I was using a user who had access to multiple subscriptions/tenants. I had the right user selected in Visual Studio, but I think it was defaulting to the wrong tenant.
I solved this by explicitly using the AzureCliCredential() and Azure CLI to login to the exact tenant. You could probably also do something similar by using EnvironmentCredential()
@hirejohnloveland - Try using Azure CLI to login. I’ve found I have a lot more control than when trying to leave the authentication up to visual studio.
By default the Azure CLI will not let you login to an tenant without a subscription (which is common if your tenant is only used for AAD). In that case try logging on with