Azure / azure-cli

Azure Command-Line Interface
MIT License
3.99k stars 2.96k forks source link

Connect-AzAccount fails with Method Not Found - #25111

Closed Obenscripe closed 1 year ago

Obenscripe commented 1 year ago

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Related command [string] $TenantId = "4dc567e4-2b82-4a00-bcdb-f1f6782a0f6e"

Write-host "ThumbP = $Thumb"
Write-host "AppId = $AppId"
Write-host "TenantId = $TenantId" 

$AZsession = Connect-AzAccount -CertificateThumbprint $Thumb -ApplicationId $AppId -Tenant $TenantId -ServicePrincipal

Describe the bug Connect-AzAccount using an app id and thumbprint and a tenant id string fails with "method not found" Az module is All up to date. Az.Accounts module completely removed and replaced with only 2.10.4 same error seen first in unattended, but then also running full script in elevated ISE under our automation id (which is local admin) No other issues with any other connection or automation on the same machine and id.

Full transcript below:


Windows PowerShell transcript start Start time: 20230112120850 Username: UDS-GBL\WarwickD RunAs User: UDS-GBL\WarwickD Machine: HOR-UDS-ADM-V01 (Microsoft Windows NT 10.0.14393.0) Host Application: C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe Process ID: 8828 PSVersion: 5.1.14393.5582 PSEdition: Desktop PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14393.5582 BuildVersion: 10.0.14393.5582 CLRVersion: 4.0.30319.42000 WSManStackVersion: 3.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1


Transcript started, output file is D:\PowerShell\ScheduledScripts\UpdateGSOCertsSecretsAndAdminSite\Log\20230112-120850-InvokeKQL.vProd.transcript.log ThumbP = BF206560A8D726B00F9569DB065D1DB5527239A1 AppId = 4f8ac5a2-d94d-417d-a4ae-597e13eca92a TenantId = 4dc567e4-2b82-4a00-bcdb-f1f6782a0f6e Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationB uilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1

)'. At D:\PowerShell\ScheduledScripts\Utilities\Connect\ConnectToOffice365.vProd.psm1:263 char:14

  • ... AZsession = Connect-AzAccount -CertificateThumbprint $Thumb -Applicat ...
  • CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. At D:\PowerShell\ScheduledScripts\Utilities\Connect\ConnectToOffice365.vProd.psm1:263 char:14
  • ... AZsession = Connect-AzAccount -CertificateThumbprint $Thumb -Applicat ...
  • CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

PS>TerminatingError(Invoke-AzOperationalInsightsQuery): "The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Run Connect-AzAccount to login." Run Connect-AzAccount to login.


Windows PowerShell transcript end End time: 20230112120851


Here is a full transcript from just now using the -debug switch


Windows PowerShell transcript start Start time: 20230112121836 Username: UDS-GBL\WarwickD RunAs User: UDS-GBL\WarwickD Machine: HOR-UDS-ADM-V01 (Microsoft Windows NT 10.0.14393.0) Host Application: C:\Windows\system32\WindowsPowerShell\v1.0\PowerShell_ISE.exe Process ID: 8828 PSVersion: 5.1.14393.5582 PSEdition: Desktop PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.14393.5582 BuildVersion: 10.0.14393.5582 CLRVersion: 4.0.30319.42000 WSManStackVersion: 3.0 PSRemotingProtocolVersion: 2.3 SerializationVersion: 1.1.0.1


Transcript started, output file is d:\temp\20230112_transcript_az.connect.log PS C:\Windows\system32> $MSGregCreds = Get-ItemProperty -Path HKCU:\Software\ScheduledScripts\MicrosoftGraph_OAuth2 $MSGSecurePassword = $MSGregCreds.Thumbprint | ConvertTo-SecureString $MSGrawUsername = $MSGregCreds.AppId $MSGcreds = New-Object System.Management.Automation.PSCredential -ArgumentList $MSGrawUsername, $MSGSecurePassword

$AppId = $MSGcreds.UserName
$Thumb = $MSGcreds.GetNetworkCredential().Password

[string] $TenantId = "4dc567e4-2b82-4a00-bcdb-f1f6782a0f6e"  

Write-host "ThumbP = $Thumb"
Write-host "AppId = $AppId"
Write-host "TenantId = $TenantId" 

ThumbP = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AppId = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TenantId = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx PS C:\Windows\system32> Connect-AzAccount -CertificateThumbprint $Thumb -ApplicationId $AppId -Tenant $TenantId -ServicePrincipal Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationB uilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1

)'. At line:1 char:2

  • Connect-AzAccount -CertificateThumbprint $Thumb -ApplicationId $AppI ...
  • CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. At line:1 char:2
  • Connect-AzAccount -CertificateThumbprint $Thumb -ApplicationId $AppI ...
  • CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

PS C:\Windows\system32> Connect-AzAccount -CertificateThumbprint $Thumb -ApplicationId $AppId -Tenant $TenantId -ServicePrincipal -debug DEBUG: 12:19:04 - ConnectAzureRmAccountCommand begin processing with ParameterSet 'ServicePrincipalCertificateWithSubscriptionId'. Confirm Continue with this operation? &Yes Yes to &All &Halt Command &Suspend A DEBUG: 12:19:07 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: 12:19:07 - [ConfigManager] Got nothing from [DefaultSubscriptionForLogin], Module = [], Cmdlet = []. Returning default value []. Confirm Are you sure you want to perform this action? Performing the operation "log in" on target "ServicePrincipal account in environment 'AzureCloud'". &Yes Yes to &All &No No to A&ll &Suspend A DEBUG: 12:19:07 - Autosave setting from startup session: 'CurrentUser' DEBUG: 12:19:07 - No autosave setting detected in environment variable 'AzContextAutoSave'. DEBUG: 12:19:07 - Using Autosave scope 'CurrentUser' DEBUG: 12:19:07 - [ServicePrincipalAuthenticator] Calling ClientCertificateCredential.GetTokenAsync - Thumbprint:'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', ApplicationId:'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', TenantId:'4dc567e4-2b82-4a00-bcdb-f1f6782a0f6e', 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.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. ---> System.MissingMethodException (0x80131513): Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. DEBUG: Azure.Identity.AuthenticationFailedException: ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. ---> System.MissingMethodException: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. at Azure.Identity.MsalConfidentialClient.d16.MoveNext() at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1.Start[TStateMachine](TStateMachine& stateMachine) at Azure.Identity.MsalConfidentialClient.CreateClientAsync(Boolean async, CancellationToken cancellationToken) at Azure.Identity.MsalClientBase1.d20.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.d18.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.d17.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.d25.MoveNext() --- End of inner exception stack trace --- at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage) at Azure.Identity.ClientCertificateCredential.d25.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.d33.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, Action1 promptAction, IAzureTokenCache tokenCache, String resourceId) at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.AcquireAccessToken(IAzureAccount account, IAzureEnvironment environment, String tenantId, SecureString password, String promptBehavior, Action1 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.<>cDisplayClass127_2.b5() 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.<>cDisplayClass127_0.b__1(AzureRmProfile localProfile, RMProfileClient profileClient, String name) DEBUG: 12:19:07 - [ConfigManager] Got [True] from [EnableDataCollection], Module = [], Cmdlet = []. Confirm ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. &Yes Yes to &All &Halt Command &Suspend A Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationB uilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1

)'. At line:1 char:1

  • Connect-AzAccount -CertificateThumbprint $Thumb -ApplicationId $AppId ...
  • CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand Connect-AzAccount : ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'. At line:1 char:1
  • Connect-AzAccount -CertificateThumbprint $Thumb -ApplicationId $AppId ...
  • CategoryInfo : CloseError: (:) [Connect-AzAccount], AuthenticationFailedException
  • FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

DEBUG: 12:19:09 - [ConfigManager] Got nothing from [DisplayBreakingChangeWarning], Module = [], Cmdlet = []. Returning default value [True]. DEBUG: AzureQoSEvent: Module: Az.Accounts:2.10.4; CommandName: Connect-AzAccount; PSVersion: 5.1.14393.5582; IsSuccess: False; Duration: 00:00:04.7116670; Exception: ClientCertificateCredential authentication failed: Method not found: 'Microsoft.Identity.Client.ConfidentialClientApplicationBuilder Microsoft.Identity.Client.ConfidentialClientApplicationBuilder.WithClientAssertion(System.Func2<System.Threading.CancellationToken,System.Threading.Tasks.Task1>)'.; DEBUG: 12:19:09 - ConnectAzureRmAccountCommand end processing. PS C:\Windows\system32> Stop-Transcript


Windows PowerShell transcript end End time: 20230112121931


To Reproduce install 2.10.4 module the connect-AzAccount, as per command in transcripts

Expected behavior Connection should be successful. Same certificate is used in other connections (not to Az) successfully

Environment summary interactive and unattended result the same error win 16 powershell running under a local admin account used for all automation - triggered as a scheduled task running whether logged in or not and running with highest privilege. powershell 5.1

Additional context the full reinstall seemed initially to allow the connection when running the full script in an elevated ISE session but as soon as that window was closed and the script run again from the task manager the connection failed. Always with the missing method error. A I missing something? Thanks Dan

files attached - one transcript one with -debug switch

20230112_transcript_az.connect.log 20230112-120850-InvokeKQL.vProd.transcript.log

modules list:

PS C:\Windows\system32> get-installedmodule

Version Name Repository Description


2.0.0.2 AIPService PSGallery PowerShell module for admins to configure and manage the protection service for Azure Information Protection.
9.2.0 Az PSGallery Microsoft Azure PowerShell - Cmdlets to manage resources in Azure. This module is compatible with PowerShell and Windows PowerShell....
2.10.4 Az.Accounts PSGallery Microsoft Azure PowerShell - Accounts credential management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.0.0 Az.Advisor PSGallery Microsoft Azure PowerShell: Advisor cmdlets
5.1.0 Az.Aks PSGallery Microsoft Azure PowerShell - Azure managed Kubernetes cmdlets for Windows PowerShell and PowerShell Core....
1.1.4 Az.AnalysisServices PSGallery Microsoft Azure PowerShell - Analysis Services cmdlets for Windows PowerShell and PowerShell Core....
4.0.1 Az.ApiManagement PSGallery Microsoft Azure PowerShell - Api Management service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.2.0 Az.AppConfiguration PSGallery Microsoft Azure PowerShell: AppConfiguration cmdlets
2.2.0 Az.ApplicationInsights PSGallery Microsoft Azure PowerShell: ApplicationInsights cmdlets
2.0.0 Az.Attestation PSGallery Microsoft Azure PowerShell - Attestation service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.8.0 Az.Automation PSGallery Microsoft Azure PowerShell - Automation service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.2.1 Az.Batch PSGallery Microsoft Azure PowerShell - Batch service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.0.0 Az.Billing PSGallery Microsoft Azure PowerShell - Billing service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.1.0 Az.Cdn PSGallery Microsoft Azure PowerShell: Cdn cmdlets
1.1.0 Az.CloudService PSGallery Microsoft Azure PowerShell: CloudService cmdlets
1.12.0 Az.CognitiveServices PSGallery Microsoft Azure PowerShell - Cognitive Services management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Cr... 5.2.0 Az.Compute PSGallery Microsoft Azure PowerShell - Compute service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core. Manages virtual... 1.0.0 Az.ConfidentialLedger PSGallery Microsoft Azure PowerShell: ConfidentialLedger cmdlets
3.1.0 Az.ContainerInstance PSGallery Microsoft Azure PowerShell: ContainerInstance cmdlets
3.0.0 Az.ContainerRegistry PSGallery Microsoft Azure PowerShell - Container Registry service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.9.0 Az.CosmosDB PSGallery Microsoft Azure PowerShell - CosmosDB service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0 Az.DataBoxEdge PSGallery Microsoft Azure PowerShell - DataBoxEdge service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.4.0 Az.Databricks PSGallery Microsoft Azure PowerShell: Databricks cmdlets
1.16.11 Az.DataFactory PSGallery Microsoft Azure PowerShell - Data Factory service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.0.2 Az.DataLakeAnalytics PSGallery Microsoft Azure PowerShell - Data Lake Analytics in Windows PowerShell and PowerShell Core....
1.3.0 Az.DataLakeStore PSGallery Microsoft Azure PowerShell - Azure Data Lake Store cmdlets in Windows PowerShell and PowerShell Core....
1.0.1 Az.DataProtection PSGallery Microsoft Azure PowerShell: DataProtection cmdlets
1.0.1 Az.DataShare PSGallery Microsoft Azure PowerShell - DataShare service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
1.1.0 Az.DeploymentManager PSGallery PowerShell .Net Core Microsoft Azure PowerShell - Deployment Manager cmdlets for Azure Resource Manager....
3.1.1 Az.DesktopVirtualization PSGallery Microsoft Azure PowerShell: DesktopVirtualization cmdlets
1.0.2 Az.DevTestLabs PSGallery Microsoft Azure PowerShell - DevTest Labs service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.2 Az.Dns PSGallery Microsoft Azure PowerShell - DNS service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.5.0 Az.EventGrid PSGallery Microsoft Azure PowerShell - Event Grid service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.2.0 Az.EventHub PSGallery Microsoft Azure PowerShell - Event Hubs service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.9.0 Az.FrontDoor PSGallery Microsoft Azure PowerShell - Front Door service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
4.0.6 Az.Functions PSGallery Microsoft Azure PowerShell - Azure Functions service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
5.0.1 Az.HDInsight PSGallery Microsoft Azure PowerShell - HDInsight service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.0.0 Az.HealthcareApis PSGallery Microsoft Azure PowerShell: HealthcareApis cmdlets
2.7.4 Az.IotHub PSGallery Microsoft Azure PowerShell - IoT Hub service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
4.9.1 Az.KeyVault PSGallery Microsoft Azure PowerShell - Key Vault service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.1.0 Az.Kusto PSGallery Microsoft Azure PowerShell: Kusto cmdlets
1.5.0 Az.LogicApp PSGallery Microsoft Azure PowerShell - Logic Apps cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.3 Az.MachineLearning PSGallery Microsoft Azure PowerShell - Machine Learning Web Services cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.2.1 Az.Maintenance PSGallery Microsoft Azure PowerShell - Maintenance cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0 Az.ManagedServiceIdentity PSGallery Microsoft Azure PowerShell: ManagedServiceIdentity cmdlets
3.0.0 Az.ManagedServices PSGallery Microsoft Azure PowerShell: ManagedServices cmdlets
2.0.0 Az.MarketplaceOrdering PSGallery Microsoft Azure PowerShell: MarketplaceOrdering cmdlets
1.1.1 Az.Media PSGallery Microsoft Azure PowerShell - Media service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.1.0 Az.Migrate PSGallery Microsoft Azure PowerShell: Migrate cmdlets
4.3.0 Az.Monitor PSGallery Microsoft Azure PowerShell - Monitor service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0 Az.MySql PSGallery Microsoft Azure PowerShell: MySql cmdlets
5.2.0 Az.Network PSGallery Microsoft Azure PowerShell - Networking service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.1 Az.NotificationHubs PSGallery Microsoft Azure PowerShell - Notification Hubs cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.2.0 Az.OperationalInsights PSGallery Microsoft Azure PowerShell - Operational Insights service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
1.5.1 Az.PolicyInsights PSGallery Microsoft Azure PowerShell - Azure Policy Insights cmdlets for Windows PowerShell and PowerShell Core. Allows querying policy evaluation ev... 1.1.0 Az.PostgreSql PSGallery Microsoft Azure PowerShell: PostgreSql cmdlets
1.2.0 Az.PowerBIEmbedded PSGallery Microsoft Azure PowerShell - Power BI Embedded service management cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell C... 1.0.3 Az.PrivateDns PSGallery Microsoft Azure PowerShell - Private DNS service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
6.1.2 Az.RecoveryServices PSGallery Microsoft Azure PowerShell - Recovery Services cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.6.0 Az.RedisCache PSGallery Microsoft Azure PowerShell - Redis Cache service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0 Az.RedisEnterpriseCache PSGallery Microsoft Azure PowerShell: RedisEnterpriseCache cmdlets
1.0.3 Az.Relay PSGallery Microsoft Azure PowerShell - Relay service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0 Az.ResourceMover PSGallery Microsoft Azure PowerShell: ResourceMover cmdlets
6.5.1 Az.Resources PSGallery Microsoft Azure PowerShell - Azure Resource Manager and Active Directory cmdlets in Windows PowerShell and PowerShell Core. Manages subscr... 1.3.0 Az.Security PSGallery Microsoft Azure PowerShell - Azure Security Center cmdlets in Windows PowerShell and PowerShell Core. Allows managing and monitoring the se... 3.0.0 Az.SecurityInsights PSGallery Microsoft Azure PowerShell: SecurityInsights cmdlets
2.1.0 Az.ServiceBus PSGallery Microsoft Azure PowerShell - Service Bus service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
3.1.0 Az.ServiceFabric PSGallery Microsoft Azure PowerShell - Service Fabric cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.5.0 Az.SignalR PSGallery Microsoft Azure PowerShell - Azure SignalR service commands for Windows PowerShell and PowerShell Core....
4.1.0 Az.Sql PSGallery Microsoft Azure PowerShell - SQL service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
1.1.0 Az.SqlVirtualMachine PSGallery Microsoft Azure PowerShell - SqlVirtualMachine service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
1.4.1 Az.StackHCI PSGallery Microsoft Azure PowerShell: StackHci cmdlets
5.2.0 Az.Storage PSGallery Microsoft Azure PowerShell - Storage service data plane and management cmdlets for Azure Resource Manager in Windows PowerShell and PowerSh... 1.7.0 Az.StorageSync PSGallery Microsoft Azure PowerShell - Storage Sync cmdlets in Windows PowerShell and PowerShell Core. Manages operations pertaining to Azure File Sy... 2.0.0 Az.StreamAnalytics PSGallery Microsoft Azure PowerShell: StreamAnalytics cmdlets
1.0.0 Az.Support PSGallery Microsoft Azure PowerShell - Azure Support cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core.
2.2.0 Az.Synapse PSGallery Microsoft Azure PowerShell - Azure Synapse Analytics in Windows PowerShell and PowerShell Core....
1.1.0 Az.TrafficManager PSGallery Microsoft Azure PowerShell - Traffic Manager service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.12.0 Az.Websites PSGallery Microsoft Azure PowerShell - App Service (Web Apps) service cmdlets for Azure Resource Manager in Windows PowerShell and PowerShell Core....
2.0.2.140 AzureAD PSGallery Azure Active Directory V2 General Availability Module....
2.0.2.149 AzureADPreview PSGallery Azure Active Directory V2 Preview Module. ...
2.0.5 ExchangeOnlineManagement PSGallery This is a General Availability (GA) release of Exchange Online PowerShell V2 module....
1.16.0 Microsoft.Graph PSGallery Microsoft Graph PowerShell module
1.16.0 Microsoft.Graph.Applications PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Authentication PSGallery Microsoft Graph PowerShell Authentication Module.
1.16.0 Microsoft.Graph.Bookings PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Calendar PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.ChangeNotifications PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.CloudCommunications PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Compliance PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.CrossDeviceExper... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.DeviceManagement PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.DeviceManagement... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.DeviceManagement... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.DeviceManagement... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.DeviceManagement... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Devices.CloudPrint PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Devices.Corporat... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Devices.ServiceA... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.DirectoryObjects PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Education PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Files PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Financials PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Groups PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Identity.Directo... PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Identity.Governance PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Identity.SignIns PSGallery Microsoft Graph PowerShell Cmdlets
6.1907.1.0 Microsoft.Graph.Intune PSGallery PowerShell SDK for Microsoft Intune Graph API
1.16.0 Microsoft.Graph.Mail PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.ManagedTenants PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Notes PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.People PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.PersonalContacts PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Planner PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Reports PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.SchemaExtensions PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Search PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Security PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Sites PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Teams PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Users PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Users.Actions PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.Users.Functions PSGallery Microsoft Graph PowerShell Cmdlets
1.16.0 Microsoft.Graph.WindowsUpdates PSGallery Microsoft Graph PowerShell Cmdlets
16.0.23019.12000 Microsoft.Online.SharePoint.Powe... PSGallery Microsoft SharePoint Online Services Module for Windows PowerShell
2.0.1 Microsoft.PowerApps.Administrati... PSGallery PowerShell interface for Microsoft PowerApps and Flow Administrative features
1.0.1 Microsoft.PowerApps.PowerShell PSGallery PowerShell interface for Microsoft PowerApps and Flow
1.2.1111 MicrosoftPowerBIMgmt PSGallery Microsoft Power BI PowerShell - All cmdlets for Microsoft Power BI
1.2.1111 MicrosoftPowerBIMgmt.Admin PSGallery Microsoft Power BI PowerShell - Administration cmdlets for Microsoft Power BI
1.2.1111 MicrosoftPowerBIMgmt.Capacities PSGallery Microsoft Power BI PowerShell - Capacity cmdlets for Microsoft Power BI
1.2.1111 MicrosoftPowerBIMgmt.Data PSGallery Microsoft Power BI PowerShell - Dataset, Dataflow and datasource cmdlets for Microsoft Power BI
1.2.1111 MicrosoftPowerBIMgmt.Profile PSGallery Microsoft Power BI PowerShell - Profile credential management cmdlets for Microsoft Power BI
1.2.1111 MicrosoftPowerBIMgmt.Reports PSGallery Microsoft Power BI PowerShell - Reports cmdlets for Microsoft Power BI
1.2.1111 MicrosoftPowerBIMgmt.Workspaces PSGallery Microsoft Power BI PowerShell - Workspace cmdlets for Microsoft Power BI
4.9.1 MicrosoftTeams PSGallery Microsoft Teams cmdlets module for Windows PowerShell and PowerShell Core....
1.2 MSCommerce PSGallery Powershell Module for accessing Microsoft Commerce APIs
1.1.166.0 MSOnline PSGallery Microsoft Online Data Service (MSOL) Module for Windows PowerShell...
1.4.7 PackageManagement PSGallery PackageManagement (a.k.a. OneGet) is a new way to discover and install software packages from around the web....
1.11.0 PnP.PowerShell PSGallery Microsoft 365 Patterns and Practices PowerShell Cmdlets
2.2.5 PowerShellGet PSGallery PowerShell module with commands for discovering, installing, updating and publishing the PowerShell artifacts like Modules, DSC Resources, ...

PS C:\Windows\system32>

Obenscripe commented 1 year ago

Just discovered 2.11.0 has been released. installed this with the command: Install-Module -Name Az.Accounts -RequiredVersion 2.11.0 -AllowClobber -force

Restarted the server. now I see two errors: Could not load type 'Microsoft.Identity.Client.Extensions.Msal.Storage' from assembly and Connect-AzAccount is not a command (presumably because the assembly has not been loaded.

PS C:\Windows\system32> D:\PowerShell\ScheduledScripts\UpdateGSOCertsSecretsAndAdminSite\InvokeKQL.vProd.ps1 WARNING: The names of some imported commands from the module 'ConnectToOffice365.vProd' include unapproved verbs that might make them less discoverable. To find the commands with unapprove d verbs, run the Import-Module command again with the Verbose parameter. For a list of approved verbs, type Get-Verb. Import-Module : Could not load type 'Microsoft.Identity.Client.Extensions.Msal.Storage' from assembly 'Microsoft.Identity.Client.Extensions.Msal, Version=2.18.4.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae'. At C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\2.11.0\Az.Accounts.psm1:87 char:1

Transcript started, output file is D:\PowerShell\ScheduledScripts\UpdateGSOCertsSecretsAndAdminSite\Log\20230112-011248-InvokeKQL.vProd.transcript.log ThumbP = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx AppId = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx TenantId = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx WARNING: The command Connect-AzAccount is part of Azure PowerShell module "Az.Accounts" and it is not installed. Run "Install-Module Az.Accounts" to install it. WARNING: The intelligent recommendation feature is in preview. Help us improve it by sharing your experience: https://go.microsoft.com/fwlink/?linkid=2202436 The term 'Connect-AzAccount' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that t he path is correct and try again. WARNING: The command Disconnect-AzAccount is part of Azure PowerShell module "Az.Accounts" and it is not installed. Run "Install-Module Az.Accounts" to install it. Disconnect-AzAccount : The term 'Disconnect-AzAccount' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At D:\PowerShell\ScheduledScripts\UpdateGSOCertsSecretsAndAdminSite\InvokeKQL.vProd.ps1:386 char:1

Transcript stopped, output file is D:\PowerShell\ScheduledScripts\UpdateGSOCertsSecretsAndAdminSite\Log\20230112-011248-InvokeKQL.vProd.transcript.log

PS C:\Windows\system32> It gets worse. I'll try to uninstall both versions of AzAccounts and re install only the newest one.

yonzhan commented 1 year ago

Please open this issue in Azure-PowerShell repo since this is PowerShell cmdlet.

Obenscripe commented 1 year ago

Ok will do Thanks

MrHinsh commented 8 months ago

https://github.com/PowerShell/vscode-powershell/issues/3633