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.

Issuer validation failed. Issuer did not match.

See original GitHub issue

Describe 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()

image

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 image
  • IDE and version : [e.g. Visual Studio 16.3] image

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:32 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
danielmackaycommented, Jul 12, 2021

@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()

1reaction
danielmackaycommented, Jan 6, 2023

@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

az login -t myb2ctenant.onmicrosoft.com --allow-no-subscriptions
Read more comments on GitHub >

github_iconTop 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 >

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