Skip to content

Azure provisioning using visual studio account not configured account #4872

@KenBrannigan

Description

@KenBrannigan

I have my personal account logged into Visual Studio (i.e. personal@outlook.com). I have my work account as an additional account in Visual Studio (i.e. work@company.com). When I right-click "Connected Services" in the AppHost project and select "Azure Resource Provisioning Settings" I select my work account and set the proper subscription name, location, and resource group.

When I run the project the provision of any Azure resource fails:

The access token is from the wrong issuer 'https://sts.windows.net/xxxxx/';. It must match the tenant 'https://sts.windows.net/yyyyy/'; associated with this subscription. Please use the authority (URL) 'https://login.windows.net/zzzzz'; to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later.
Status: 401 (Unauthorized)
ErrorCode: InvalidAuthenticationTokenTenant

To be safe, I replaced the guid's on purpose in the message above. I am not sure if showing them is a security issue.

If I log my personal account out of Visual Studio and log in with my work account and run again it provisions everything with no issues.

Shouldn't Aspire use the account I selected in "Azure Resource Provisioning Settings" to handle the provisioning?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagesazureIssues associated specifically with scenarios tied to using Azure

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions