Can't upload to a blob from a local dev Maui client, tried VS account, service principal, system environment variables, etc.

Mike Spain 35 Reputation points
2025-04-15T18:49:12.7833333+00:00

I'm trying to use DefaultAzureCredential. I installed Azure CLI successfully (I believe) and used it to create a service principal with a Storage Blob Data Contributor role. I also had tried to use my VS account and I had set up my system environment variables. None of these seem to work.

I keep getting this error:

DefaultAzureCredential failed to retrieve a token from the included credentials. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/defaultazurecredential/troubleshoot
EnvironmentCredential authentication unavailable. Environment variables are not fully configured. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/environmentcredential/troubleshoot
WorkloadIdentityCredential authentication unavailable. The workload options are not fully configured. See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/workloadidentitycredential/troubleshoot
ManagedIdentityCredential authentication unavailable. No response received from the managed identity endpoint.
Visual Studio Token provider can't be accessed at /data/user/0/witnessed.app/files/.IdentityService/AzureServiceAuth/tokenprovider.json
Azure CLI not installed
PowerShell is not installed.
Azure Developer CLI could not be found.
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
3,143 questions
{count} votes

Accepted answer
  1. Keshavulu Dasari 4,665 Reputation points Microsoft External Staff
    2025-04-18T17:59:17.4866667+00:00

    Hi Mike Spain ,

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to "Accept " the answer. Accepted answers show up at the top, resulting in improved discoverability for others.

    Issue: Can't upload to a blob from a local dev Maui client, tried VS account, service principal, system environment variables, etc.

    Solution: Customer shared - "AzureCliCredential and Azure CLI authentication is not possible from .NET Maui code running from an Android emulator."

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.