-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
customer-reportedneeds-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Description
Seemingly randomly, I receive the following error when I log on as a service principal using a certificate. Restarting the terminal in VSCode sometimes resolves it. Sometimes it does not.
Issue script & Debug output
Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ApplicationId -Tenant $TenantId -ServicePrincipal -ErrorAction Stop
Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found:
'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertio
n(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task`1<System.String>>)'.
At line:1 char:1
+ Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
DEBUG: 5:54:39 PM - ConnectAzureRmAccountCommand begin processing with ParameterSet 'ServicePrincipalCertificateWithSubscriptionId'.
DEBUG: 5:54:39 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 5:54:39 PM - [ConfigManager] Got nothing from [DefaultSubscriptionForLogin], Module = [], Cmdlet = []. Returning default value [].
DEBUG: 5:54:39 PM - Autosave setting from startup session: 'CurrentUser'
DEBUG: 5:54:39 PM - No autosave setting detected in environment variable 'AzContextAutoSave'.
DEBUG: 5:54:39 PM - Using Autosave scope 'CurrentUser'
DEBUG: 5:54:39 PM - [ServicePrincipalAuthenticator] Calling ClientCertificateCredential.GetTokenAsync -
Thumbprint:'', ApplicationId:'',
TenantId:'', Scopes:'https://management.core.windows.net//.default',
AuthorityHost:'https://login.microsoftonline.com/'
DEBUG: ClientCertificateCredential.GetToken invoked. Scopes: [ https://management.core.windows.net//.default ] ParentRequestId:
DEBUG: ClientCertificateCredential.GetToken was unable to retrieve an access token. Scopes: [ https://management.core.windows.net//.default ]
ParentRequestId: Exception: Azure.Identity.AuthenticationFailedException (0x80131500): ClientCertificateCredential authentication failed:
Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder
Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Thr
eading.Tasks.Task`1<System.String>>)'.
---> System.MissingMethodException (0x80131513): Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder
Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Thr
eading.Tasks.Task`1<System.String>>)'.
DEBUG: Azure.Identity.AuthenticationFailedException: ClientCertificateCredential authentication failed: Method not found:
'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder
Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Thr
eading.Tasks.Task`1<System.String>>)'. ---> System.MissingMethodException: Method not found:
'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder
Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Thr
eading.Tasks.Task`1<System.String>>)'.
at Azure.Identity.MsalConfidentialClient.<CreateClientAsync>d__16.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at Azure.Identity.MsalConfidentialClient.CreateClientAsync(Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalClientBase`1.<GetClientAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.MsalConfidentialClient.<AcquireTokenForClientCoreAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.MsalConfidentialClient.<AcquireTokenForClientAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.ClientCertificateCredential.<GetTokenAsync>d__25.MoveNext()
--- End of inner exception stack trace ---
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage)
at Azure.Identity.ClientCertificateCredential.<GetTokenAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.PowerShell.Authenticators.MsalAccessToken.<GetAccessTokenAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account, IAzureEnvironment
environment, String tenant, SecureString password, String promptBehavior, Action`1 promptAction, IAzureTokenCache tokenCache, String
resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account, IAzureEnvironment environment,
String tenantId, SecureString password, String promptBehavior, Action`1 promptAction, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment environment, String
tenantIdOrName, String subscriptionId, String subscriptionName, SecureString password, Boolean skipValidation, Action`1 promptAction, String
name, Boolean shouldPopulateContextList, Int32 maxContextPopulation, String authScope)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_2.<ExecuteCmdlet>b__5()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_0.<ExecuteCmdlet>b__1(AzureRmProfile localProfile,
RMProfileClient profileClient, String name)
DEBUG: 5:54:39 PM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
WARNING: Cannot Connect to Azure as the Service Principal! ClientCertificateCredential authentication failed: Method not found:
'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder
Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Thr
eading.Tasks.Task`1<System.String>>)'.Environment data
Name Value
---- -----
PSVersion 5.1.20348.1366
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.1366
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1Module versions
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 2.10.4 Az.Accounts {Add-AzEnvironment, Clear-AzConfig, Clear-AzContext, Clear-AzDefault...}Error output
DEBUG: 5:56:20 PM - ResolveError begin processing with ParameterSet 'AnyErrorParameterSet'.
DEBUG: 5:56:20 PM - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True].
WARNING: Upcoming breaking changes in the cmdlet 'Resolve-AzError' :
The `Resolve-Error` alias will be removed in a future release. Please change any scripts that use this alias to use `Resolve-AzError`
instead.
Note : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes
in Azure PowerShell.
HistoryId: 4
Message : ClientCertificateCredential authentication failed: Method not found:
'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilde
r.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task`1<System.String>>)'.
StackTrace : at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage)
at Azure.Identity.ClientCertificateCredential.<GetTokenAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.PowerShell.Authenticators.MsalAccessToken.<GetAccessTokenAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account,
IAzureEnvironment environment, String tenant, SecureString password, String promptBehavior, Action`1 promptAction,
IAzureTokenCache tokenCache, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account,
IAzureEnvironment environment, String tenantId, SecureString password, String promptBehavior, Action`1 promptAction, String
resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment
environment, String tenantIdOrName, String subscriptionId, String subscriptionName, SecureString password, Boolean
skipValidation, Action`1 promptAction, String name, Boolean shouldPopulateContextList, Int32 maxContextPopulation, String
authScope)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_2.<ExecuteCmdlet>b__5()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at
Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_0.<ExecuteCmdlet>b__1(AzureRmProfile
localProfile, RMProfileClient profileClient, String name)
at Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action`2 contextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePrompt(Action`3 setContextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : Azure.Identity.AuthenticationFailedException
InvocationInfo : {Connect-AzAccount}
Line : Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ApplicationId -Tenant $TenantId
-ServicePrincipal -ErrorAction Stop | Out-Null
Position : At .ps1:94 char:13
+ Connect-AzAccount -CertificateThumbprint $Thumbprint -App ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClien
tApplicationBuilder.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task`1<System
.String>>)'.
StackTrace : at Azure.Identity.MsalConfidentialClient.<CreateClientAsync>d__16.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at Azure.Identity.MsalConfidentialClient.CreateClientAsync(Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalClientBase`1.<GetClientAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.MsalConfidentialClient.<AcquireTokenForClientCoreAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.MsalConfidentialClient.<AcquireTokenForClientAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.ClientCertificateCredential.<GetTokenAsync>d__25.MoveNext()
Exception : System.MissingMethodException
InvocationInfo : {Connect-AzAccount}
Line : Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ApplicationId -Tenant $TenantId
-ServicePrincipal -ErrorAction Stop | Out-Null
Position : At .ps1:94 char:13
+ Connect-AzAccount -CertificateThumbprint $Thumbprint -App ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : No modules were removed. Verify that the specification of modules to remove is correct and those modules exist in the
runspace.
StackTrace :
Exception : System.InvalidOperationException
InvocationInfo : {Remove-Module}
Line : Remove-Module AzureAD -ErrorAction SilentlyContinue
Position : At .ps1:106 char:3
+ Remove-Module AzureAD -ErrorAction SilentlyContinue
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 4
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 4
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 4
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 4
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 4
HistoryId: 1
Message : ClientCertificateCredential authentication failed: Method not found:
'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilde
r.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task`1<System.String>>)'.
StackTrace : at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage)
at Azure.Identity.ClientCertificateCredential.<GetTokenAsync>d__25.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.PowerShell.Authenticators.MsalAccessToken.<GetAccessTokenAsync>d__33.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Azure.Commands.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzureAccount account,
IAzureEnvironment environment, String tenant, SecureString password, String promptBehavior, Action`1 promptAction,
IAzureTokenCache tokenCache, String resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account,
IAzureEnvironment environment, String tenantId, SecureString password, String promptBehavior, Action`1 promptAction, String
resourceId)
at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment
environment, String tenantIdOrName, String subscriptionId, String subscriptionName, SecureString password, Boolean
skipValidation, Action`1 promptAction, String name, Boolean shouldPopulateContextList, Int32 maxContextPopulation, String
authScope)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_2.<ExecuteCmdlet>b__5()
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at
Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass127_0.<ExecuteCmdlet>b__1(AzureRmProfile
localProfile, RMProfileClient profileClient, String name)
at Microsoft.Azure.Commands.Profile.Common.AzureContextModificationCmdlet.ModifyContext(Action`2 contextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.SetContextWithOverwritePrompt(Action`3 setContextAction)
at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.ProcessRecord()
Exception : Azure.Identity.AuthenticationFailedException
InvocationInfo : {Connect-AzAccount}
Line : Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ApplicationId -Tenant $TenantId
-ServicePrincipal -ErrorAction Stop | Out-Null
Position : At .ps1:94 char:13
+ Connect-AzAccount -CertificateThumbprint $Thumbprint -App ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1
Message : Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClien
tApplicationBuilder.WithClientAssertion(System.Func`2<System.Threading.CancellationToken,System.Threading.Tasks.Task`1<System
.String>>)'.
StackTrace : at Azure.Identity.MsalConfidentialClient.<CreateClientAsync>d__16.MoveNext()
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at Azure.Identity.MsalConfidentialClient.CreateClientAsync(Boolean async, CancellationToken cancellationToken)
at Azure.Identity.MsalClientBase`1.<GetClientAsync>d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.MsalConfidentialClient.<AcquireTokenForClientCoreAsync>d__18.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.MsalConfidentialClient.<AcquireTokenForClientAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Azure.Identity.ClientCertificateCredential.<GetTokenAsync>d__25.MoveNext()
Exception : System.MissingMethodException
InvocationInfo : {Connect-AzAccount}
Line : Connect-AzAccount -CertificateThumbprint $Thumbprint -ApplicationId $ApplicationId -Tenant $TenantId
-ServicePrincipal -ErrorAction Stop | Out-Null
Position : At .ps1:94 char:13
+ Connect-AzAccount -CertificateThumbprint $Thumbprint -App ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1
Message : You must call the Connect-AzureAD cmdlet before calling any other cmdlets.
StackTrace : at Microsoft.Open.Azure.AD.CommonLibrary.AzureSession.ClientAuthenticated() in
C:\__w\1\s\src\dev\PowerShell.V2\CommonLibrary\Models\AzureSession.cs:line 110
at System.Management.Automation.Cmdlet.DoBeginProcessing()
at System.Management.Automation.CommandProcessorBase.DoBegin()
Exception : Microsoft.Open.Azure.AD.CommonLibrary.AadNeedAuthenticationException
InvocationInfo : {Get-AzureADTenantDetail}
Line : $Var = Get-AzureADTenantDetail
Position : At .ps1:112 char:14
+ $Var = Get-AzureADTenantDetail
+ ~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1
Message : No modules were removed. Verify that the specification of modules to remove is correct and those modules exist in the
runspace.
StackTrace :
Exception : System.InvalidOperationException
InvocationInfo : {Remove-Module}
Line : Remove-Module AzureAD -ErrorAction SilentlyContinue
Position : At .ps1:106 char:3
+ Remove-Module AzureAD -ErrorAction SilentlyContinue
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1
Message : Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.
StackTrace : at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)
at System.Reflection.RuntimeModule.GetTypes()
at System.Reflection.Assembly.GetTypes()
at Microsoft.PowerShell.Commands.AddTypeCommand.LoadAssemblyFromPathOrName(List`1 generatedTypes)
at Microsoft.PowerShell.Commands.AddTypeCommand.EndProcessing()
at System.Management.Automation.CommandProcessorBase.Complete()
Exception : System.Reflection.ReflectionTypeLoadException
InvocationInfo : {Add-Type}
Line : Add-Type -Path $_.FullName -ErrorAction Ignore | Out-Null
Position : At \WindowsPowerShell\Modules\Az.Accounts\2.10.4\Az.Accounts.psm1:39
char:21
+ ... Add-Type -Path $_.FullName -ErrorAction Ignore | Out-N ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 1
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 1
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 1
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 1
Message : The specified module 'C:\Program
Files\DesiredStateConfiguration\1.0.0.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psd1' was not loaded
because no valid module file was found in any module directory.
StackTrace :
Exception : System.IO.FileNotFoundException
InvocationInfo : {Import-Module}
Line :
Position :
HistoryId : 1
The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.
DEBUG: AzureQoSEvent: Module: Az.Accounts:2.10.4; CommandName: Resolve-AzError; PSVersion: 5.1.20348.1366; IsSuccess: True; Duration:
00:00:00.4008530
DEBUG: 5:56:20 PM - [ConfigManager] Got nothing from [EnableDataCollection], Module = [], Cmdlet = []. Returning default value [True].
DEBUG: 5:56:20 PM - ResolveError end processing.Metadata
Metadata
Assignees
Labels
customer-reportedneeds-team-attentionThis issue needs attention from Azure service team or SDK teamThis issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that