Skip to content

Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials #10932

@shleiAmy

Description

@shleiAmy

I have recently added AzureAttestationServiceEndpointResourceId and AzureAttestationServiceEndpointSuffix to AzAccount, and the current Az.Account version (1.7.0) should have contained the changes.

I am developing new powershell cmdlets for attestation and need to query the serviceClientCredientials from AzureAttestationServiceEndpointResourceId.

But I am getting the error: Your Azure credentials have not been set up or have expired, please run Connect-AzAccount to set up your Azure credentials.

After further debug, I found that AzureAttestationServiceEndpointResourceIdis is not defined in either Environment or ExtendedProperties dictinary.

Here is the version it refers to" #region Assembly Microsoft.Azure.PowerShell.Authentication.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35// C:\Users\shlei.nuget\packages\microsoft.azure.powershell.authentication.abstractions\1.3.4-preview\lib\netstandard2.0\Microsoft.Azure.PowerShell.Authentication.Abstractions.dll

PS C:\myWorkingDirectory\azure-powershell\artifacts\Debug\Az.Attestation> module

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.7.0      Az.Accounts                         {Add-AzEnvironment, Clear-AzContext, Clear-AzDefault, Connec…

PS C:\myWorkingDirectory\azure-powershell\artifacts\Debug\Az.Attestation> Get-AzEnvironment -Name AzureCloud | fl *

Name                                              : AzureCloud
EnableAdfsAuthentication                          : False
OnPremise                                         : False
ActiveDirectoryServiceEndpointResourceId          : https://management.core.windows.net/
AdTenant                                          : Common
GalleryUrl                                        : https://gallery.azure.com/
ManagementPortalUrl                               : https://go.microsoft.com/fwlink/?LinkId=254433
ServiceManagementUrl                              : https://management.core.windows.net/
PublishSettingsFileUrl                            : https://go.microsoft.com/fwlink/?LinkID=301775
ResourceManagerUrl                                : https://management.azure.com/
SqlDatabaseDnsSuffix                              : .database.windows.net
StorageEndpointSuffix                             : core.windows.net
ActiveDirectoryAuthority                          : https://login.microsoftonline.com/
GraphUrl                                          : https://graph.windows.net/
GraphEndpointResourceId                           : https://graph.windows.net/
TrafficManagerDnsSuffix                           : trafficmanager.net
AzureKeyVaultDnsSuffix                            : vault.azure.net
DataLakeEndpointResourceId                        : https://datalake.azure.net/
AzureDataLakeStoreFileSystemEndpointSuffix        : azuredatalakestore.net
AzureDataLakeAnalyticsCatalogAndJobEndpointSuffix : azuredatalakeanalytics.net
AzureKeyVaultServiceEndpointResourceId            : https://vault.azure.net
AzureOperationalInsightsEndpointResourceId        : https://api.loganalytics.io
AzureOperationalInsightsEndpoint                  : https://api.loganalytics.io/v1
AzureAnalysisServicesEndpointSuffix               : asazure.windows.net
AnalysisServicesEndpointResourceId                : https://region.asazure.windows.net
AzureAttestationServiceEndpointSuffix             : attest.azure.net
AzureAttestationServiceEndpointResourceId         : https://attest.azure.net
VersionProfiles                                   : {}
ExtendedProperties                                : {[OperationalInsightsEndpoint, https://api.loganalytics.io/v1], [OperationalInsightsEndpointResourceId,
                                                    https://api.loganalytics.io], [AzureAnalysisServicesEndpointSuffix, asazure.windows.net],
                                                    [AnalysisServicesEndpointResourceId, https://region.asazure.windows.net]…}
BatchEndpointResourceId                           : https://batch.core.windows.net/

Cost

Metadata

Metadata

Assignees

Labels

Azure PS TeamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions