Azure / azure-powershell

Microsoft Azure PowerShell
Other
4.21k stars 3.81k forks source link

Connect-AzConnect report AADSTS900144: The request body must contain the following parameter: 'password' when all existing contexts are removed #12775

Closed sscchh2001 closed 4 years ago

sscchh2001 commented 4 years ago

Description

This happens in Azure China environment. When I remove all the existing contexts from PS session, Connect-AzAccount would respond with AADSTS900144: The request body must contain the following parameter: 'password'.

Steps to reproduce

PS C:\Users\user\Desktop> get-azcontext -ListAvailable | Remove-AzContext -force
PS C:\Users\user\Desktop> get-azcontext
PS C:\Users\user\Desktop> Connect-AzAccount -Environment azurechinacloud -Credential $cred
Connect-AzAccount : AADSTS900144: The request body must contain the following parameter: 'password'.
Trace ID: f42d9ddc-655a-433b-ba28-61ad5f053b00
Correlation ID: 3aab26e5-d24f-47af-bdc5-045580669d00
Timestamp: 2020-08-26 10:04:43Z
At line:1 char:1
+ Connect-AzAccount -Environment azurechinacloud -Credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Connect-AzAccount], AdalServiceException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

Environment data

Name                           Value
----                           -----
PSVersion                      5.1.19041.1
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.19041.1
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

Module versions

PS C:\Users\user\Desktop> (Get-Module  -ListAvailable)

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.9.3      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enab...
Script     1.1.1      Az.Advisor                          {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendati...
Script     1.2.0      Az.Aks                              {Get-AzAksCluster, New-AzAksCluster, Remove-AzAksCluster, ...
Script     1.1.4      Az.AnalysisServices                 {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServic...
Script     2.1.0      Az.ApiManagement                    {Add-AzApiManagementApiToGateway, Add-AzApiManagementApiTo...
Script     1.1.0      Az.ApplicationInsights              {Get-AzApplicationInsights, New-AzApplicationInsights, Rem...
Script     1.4.0      Az.Automation                       {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHyb...
Script     3.1.0      Az.Batch                            {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAcc...
Script     1.0.3      Az.Billing                          {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollme...
Script     1.4.3      Az.Cdn                              {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfil...
Script     1.5.1      Az.CognitiveServices                {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAc...
Script     4.3.0      Az.Compute                          {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAv...
Script     1.0.3      Az.ContainerInstance                {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzCont...
Script     1.1.1      Az.ContainerRegistry                {New-AzContainerRegistry, Get-AzContainerRegistry, Update-...
Script     1.1.0      Az.DataBoxEdge                      {Get-AzDataBoxEdgeJob, Get-AzDataBoxEdgeDevice, Invoke-AzD...
Script     1.10.0     Az.DataFactory                      {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFa...
Script     1.0.2      Az.DataLakeAnalytics                {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalytic...
Script     1.2.8      Az.DataLakeStore                    {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeSt...
Script     1.0.0      Az.DataShare                        {New-AzDataShareAccount, Get-AzDataShareAccount, Remove-Az...
Script     1.1.0      Az.DeploymentManager                {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentMa...
Script     1.0.0      Az.DesktopVirtualization            {Disconnect-AzWvdUserSession, Get-AzWvdApplication, Get-Az...
Script     1.0.2      Az.DevTestLabs                      {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolic...
Script     1.1.2      Az.Dns                              {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRe...
Script     1.3.0      Az.EventGrid                        {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGr...
Script     1.5.0      Az.EventHub                         {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzE...
Script     1.6.1      Az.FrontDoor                        {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove...
Script     1.0.1      Az.Functions                        {Get-AzFunctionApp, Get-AzFunctionAppAvailableLocation, Ge...
Script     3.5.0      Az.HDInsight                        {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wa...
Script     1.1.0      Az.HealthcareApis                   {New-AzHealthcareApisService, Remove-AzHealthcareApisServi...
Script     2.5.0      Az.IotHub                           {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-A...
Script     2.1.0      Az.KeyVault                         {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, ...
Script     1.3.2      Az.LogicApp                         {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccou...
Script     1.1.3      Az.MachineLearning                  {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssocia...
Script     1.1.0      Az.Maintenance                      {Get-AzApplyUpdate, Get-AzConfigurationAssignment, Get-AzM...
Script     1.1.0      Az.ManagedServices                  {Get-AzManagedServicesAssignment, New-AzManagedServicesAss...
Script     1.0.2      Az.MarketplaceOrdering              {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script     1.1.1      Az.Media                            {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get...
Script     2.1.0      Az.Monitor                          {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile...
Script     3.3.0      Az.Network                          {Add-AzApplicationGatewayAuthenticationCertificate, Get-Az...
Script     1.1.1      Az.NotificationHubs                 {Get-AzNotificationHub, Get-AzNotificationHubAuthorization...
Script     2.3.0      Az.OperationalInsights              {New-AzOperationalInsightsAzureActivityLogDataSource, New-...
Script     1.3.1      Az.PolicyInsights                   {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSu...
Script     1.1.2      Az.PowerBIEmbedded                  {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspa...
Script     1.0.3      Az.PrivateDns                       {Get-AzPrivateDnsZone, Remove-AzPrivateDnsZone, Set-AzPriv...
Script     2.11.1     Az.RecoveryServices                 {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServi...
Script     1.2.1      Az.RedisCache                       {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheSchedul...
Script     1.0.3      Az.Relay                            {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNa...
Script     2.5.0      Az.Resources                        {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzR...
Script     1.4.1      Az.ServiceBus                       {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set...
Script     2.1.0      Az.ServiceFabric                    {Add-AzServiceFabricClientCertificate, Add-AzServiceFabric...
Script     1.2.0      Az.SignalR                          {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSig...
Script     2.9.1      Az.Sql                              {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlData...
Script     1.1.0      Az.SqlVirtualMachine                {New-AzSqlVM, Get-AzSqlVM, Update-AzSqlVM, Remove-AzSqlVM...}
Script     2.5.0      Az.Storage                          {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStor...
Script     1.3.0      Az.StorageSync                      {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSync...
Script     1.0.1      Az.StreamAnalytics                  {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefau...
Script     1.0.0      Az.Support                          {Get-AzSupportService, Get-AzSupportProblemClassification,...
Script     1.0.4      Az.TrafficManager                   {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTraf...
Script     1.11.0     Az.Websites                         {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServ...
Script     5.3.0      Azure                               {Get-AzureAutomationCertificate, Get-AzureAutomationConnec...
Binary     2.0.2.76   AzureAD                             {Add-AzureADApplicationOwner, Get-AzureADApplication, Get-...
Manifest   8.1.0      ComputerManagementDsc
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Manifest   1.0        MoveAzureTempDrive
Manifest   1.1.183.17 MSOnline                            {Get-MsolDevice, Remove-MsolDevice, Enable-MsolDevice, Dis...
Manifest   1.0        nx
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-Packa...
Script     3.4.0      Pester                              {Describe, Context, It, Should...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     2.0.0      PSReadline                          {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remov...
Script     21.1.18080 SqlServer                           {Add-RoleMember, Add-SqlAvailabilityDatabase, Add-SqlAvail...
Manifest   1.8.0.0    xComputerManagement

    Directory: C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.0.0    AppBackgroundTask                   {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgro...
Manifest   2.0.0.0    AppLocker                           {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-Ap...
Manifest   1.0.0.0    AppvClient                          {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add...
Manifest   2.0.1.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest...
Script     1.0.0.0    AssignedAccess                      {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAcc...
Manifest   1.0.0.0    BitLocker                           {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Re...
Manifest   2.0.0.0    BitsTransfer                        {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Re...
Manifest   1.0.0.0    BranchCache                         {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disa...
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance,...
Manifest   1.0        ConfigCI                            {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIP...
Manifest   1.0        ConfigDefender                      {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest   1.0        Defender                            {Get-MpPreference, Set-MpPreference, Add-MpPreference, Rem...
Manifest   1.0.2.0    DeliveryOptimization                {Delete-DeliveryOptimizationCache, Set-DeliveryOptimizatio...
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntry...
Script     3.0        Dism                                {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-Window...
Manifest   1.0.0.0    DnsClient                           {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get...
Manifest   1.0.0.0    EventTracingManagement              {Start-EtwTraceSession, New-EtwTraceSession, Get-EtwTraceS...
Manifest   1.0.0.0    HgsClient                           {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfigurat...
Manifest   1.0.0.0    HgsDiagnostics                      {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, T...
Binary     1.0.0.0    HostComputeService                  {Get-ComputeProcess, Stop-ComputeProcess}
Manifest   1.0.0.1    HostNetworkingService               {Remove-HnsNamespace, Remove-HnsEndpoint, Get-HnsEndpoint,...
Binary     2.0.0.0    Hyper-V                             {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChanne...
Binary     1.1        Hyper-V                             {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDriv...
Manifest   2.0.0.0    International                       {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMet...
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-Iscs...
Script     1.0.0.0    ISE                                 {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest   1.0.0.0    Kds                                 {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsC...
Manifest   1.0.1.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}
Manifest   3.0.0.0    Microsoft.PowerShell.Diagnostics    {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}
Manifest   1.0.0.0    Microsoft.PowerShell.LocalAccounts  {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser...
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...
Script     1.0        Microsoft.PowerShell.ODataUtils     Export-ODataEndpointProxy
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredS...
Manifest   1.0        MMAgent                             {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...
Manifest   1.0.0.0    MsDtc                               {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTrans...
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-Ne...
Manifest   1.0.0.0    NetConnection                       {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest   1.0.0.0    NetDiagnostics                      Get-NetView
Manifest   1.0.0.0    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEvent...
Manifest   2.0.0.0    NetLbfo                             {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTea...
Manifest   1.0.0.0    NetNat                              {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMa...
Manifest   2.0.0.0    NetQos                              {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, ...
Manifest   2.0.0.0    NetSecurity                         {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPse...
Manifest   1.0.0.0    NetSwitchTeam                       {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTea...
Manifest   1.0.0.0    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol...
Manifest   1.0.0.0    NetworkConnectivityStatus           {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Rese...
Manifest   1.0.0.0    NetworkSwitchManager                {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEt...
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfig...
Manifest   1.0.0.0    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restar...
Binary     1.0.0.0    PersistentMemory                    {Get-PmemDisk, Get-PmemPhysicalDevice, Get-PmemUnusedRegio...
Manifest   1.0.0.0    PKI                                 {Add-CertificateEnrollmentPolicyServer, Export-Certificate...
Manifest   1.0.0.0    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, D...
Manifest   1.1        PrintManagement                     {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-Prin...
Binary     1.0.11     ProcessMitigations                  {Get-ProcessMitigation, Set-ProcessMitigation, ConvertTo-P...
Script     3.0        Provisioning                        {Install-ProvisioningPackage, Export-ProvisioningPackage, ...
Manifest   1.1        PSDesiredStateConfiguration         {Set-DscLocalConfigurationManager, Start-DscConfiguration,...
Script     1.0.0.0    PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WS...
Binary     1.1.0.0    PSScheduledJob                      {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-Jo...
Manifest   2.0.0.0    PSWorkflow                          {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest   1.0.0.0    PSWorkflowUtility                   Invoke-AsWorkflow
Manifest   1.0.0.0    ScheduledTasks                      {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledT...
Manifest   2.0.0.0    SecureBoot                          {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBoo...
Manifest   2.0.0.0    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbSha...
Manifest   2.0.0.0    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...
Manifest   1.0.0.0    StartLayout                         {Export-StartLayout, Import-StartLayout, Export-StartLayou...
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add...
Manifest   1.0.0.0    StorageBusCache                     {Clear-StorageBusDisk, Disable-StorageBusCache, Disable-St...
Manifest   2.0.0.0    TLS                                 {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disa...
Manifest   1.0.0.0    TroubleshootingPack                 {Get-TroubleshootingPack, Invoke-TroubleshootingPack}
Manifest   2.0.0.0    TrustedPlatformModule               {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...}
Binary     2.1.639.0  UEV                                 {Clear-UevConfiguration, Clear-UevAppxPackage, Restore-Uev...
Manifest   2.0.0.0    VpnClient                           {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnectio...
Manifest   1.0.0.0    Wdac                                {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...}
Manifest   2.0.0.0    Whea                                {Get-WheaMemoryPolicy, Set-WheaMemoryPolicy}
Manifest   1.0.0.0    WindowsDeveloperLicense             {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperL...
Script     1.0        WindowsErrorReporting               {Enable-WindowsErrorReporting, Disable-WindowsErrorReporti...
Manifest   1.0.0.0    WindowsSearch                       {Get-WindowsSearchSetting, Set-WindowsSearchSetting}
Manifest   1.0.0.0    WindowsUpdate                       Get-WindowsUpdateLog
Manifest   1.0.0.2    WindowsUpdateProvider               {Get-WUAVersion, Get-WULastInstallationDate, Get-WULastSca...

    Directory: C:\Program Files (x86)\Microsoft Azure Information Protection\Powershell

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     2.6.111.0  AzureInformationProtection          {Clear-AIPAuthentication, Get-AIPFileStatus, New-AIPCustom...

Debug output

PS C:\Users\user\Desktop> get-azcontext -ListAvailable | Remove-AzContext -force
DEBUG: 6:55:36 PM - GetAzureRMContextCommand begin processing with ParameterSet 'ListAllContexts'.
DEBUG: 6:55:36 PM - RemoveAzureRmContext begin processing with ParameterSet 'RemoveByInputObject'.
DEBUG: AzureQoSEvent: CommandName - Get-AzContext; IsSuccess - True; Duration - 00:00:00.0056676;
DEBUG: Finish sending metric.
DEBUG: 6:55:37 PM - GetAzureRMContextCommand end processing.
DEBUG: AzureQoSEvent: CommandName - Remove-AzContext; IsSuccess - True; Duration - 00:00:01.0716896;
DEBUG: Finish sending metric.
DEBUG: 6:55:38 PM - RemoveAzureRmContext end processing.
PS C:\Users\user\Desktop> Get-AzContext
DEBUG: 6:55:47 PM - GetAzureRMContextCommand begin processing with ParameterSet 'GetSingleContext'.
DEBUG: AzureQoSEvent: CommandName - Get-AzContext; IsSuccess - True; Duration - 00:00:00.0024853;
DEBUG: Finish sending metric.
DEBUG: 6:55:48 PM - GetAzureRMContextCommand end processing.
PS C:\Users\user\Desktop> Connect-AzAccount -Environment azurechinacloud -Credential $cred
DEBUG: 6:55:56 PM - ConnectAzureRmAccountCommand begin processing with ParameterSet 'UserWithCredential'.
DEBUG: 6:55:56 PM - Autosave setting from startup session: 'CurrentUser'
DEBUG: 6:55:56 PM - No autosave setting detected in environment variable 'AzContextAutoSave'.
DEBUG: 6:55:56 PM - Using Autosave scope 'CurrentUser'
DEBUG: 6:55:56 PM - Autosave setting from startup session: 'CurrentUser'
DEBUG: 6:55:56 PM - No autosave setting detected in environment variable 'AzContextAutoSave'.
DEBUG: 6:55:56 PM - Using Autosave scope 'CurrentUser'
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4234500Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: ADAL
PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
'2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4234500Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: ADAL
PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version
'2a8bec6c4c76d0c1ef819b55bdc3cda2d2605056' is running...
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4234500Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: ===
Token Acquisition started:
 CacheType: null
 Authentication Target: User
 , Authority Host: login.chinacloudapi.cn
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4234500Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: ===
Token Acquisition started:
 Authority: https://login.chinacloudapi.cn/Common/
 Resource: https://management.core.chinacloudapi.cn/
 ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
 CacheType: null
 Authentication Target: User

DEBUG: [ADAL]: Verbose: 2020-08-26T10:55:56.4234500Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Verbose: 2020-08-26T10:55:56.4234500Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Loading
from cache.
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4274638Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs:
Deserialized 23 items to token cache.
DEBUG: [ADAL]: Verbose: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Verbose: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Looking up
cache for a token...
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Cross
Tenant refresh token was found in the cache
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Cross
Tenant refresh token was found in the cache
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Information: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: A
matching item (access token or refresh token or both) was found in the cache
DEBUG: [ADAL]: Verbose: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Refreshing
access token...
DEBUG: [ADAL]: Verbose: 2020-08-26T10:55:56.4274638Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Refreshing
access token...
DEBUG: [ADAL]: Information: 2020-08-26T10:55:57.2164687Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Sending
 request to userrealm endpoint.
DEBUG: [ADAL]: Information: 2020-08-26T10:55:57.2164687Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Sending
 request to userrealm endpoint.
DEBUG: [ADAL]: Information: 2020-08-26T10:55:57.8436814Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs:  User
with user name 'user@domain.partner.onmschina.cn' detected as 'Managed'
DEBUG: [ADAL]: Error: 2020-08-26T10:55:58.6810018Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs: Exception
type: Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException, ErrorCode: invalid_request, StatusCode: 400
 ---> Exception type: System.Net.Http.HttpRequestException ---> Exception type:
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException, ErrorCode:
{"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter:
'password'.\r\nTrace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400\r\nCorrelation ID:
1fb19d9f-1a6f-4826-a38e-ed265328a3d0\r\nTimestamp: 2020-08-26 10:55:58Z","error_codes":[900144],"timestamp":"2020-08-26

10:55:58Z","trace_id":"c18d0b01-ef5b-4222-9094-c1421d3d3400","correlation_id":"1fb19d9f-1a6f-4826-a38e-ed265328a3d0","e
rror_uri":"https://login.partner.microsoftonline.cn/error?code=900144"}
--- End of inner exception stack trace ---
--- End of inner exception stack trace ---
   at
Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d__22`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d__21`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendHttpMessageAsync>d__72.Move
Next()
--- 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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendTokenRequestAsync>d__69.Mov
eNext()
--- 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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<CheckAndAcquireTokenUsingBroker
Async>d__59.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<RunAsync>d__57.MoveNext()
DEBUG: [ADAL]: Error: 2020-08-26T10:55:58.6820009Z: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0 - LoggerBase.cs:
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS900144: The request body must contain the
following parameter: 'password'.
Trace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400
Correlation ID: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0
Timestamp: 2020-08-26 10:55:58Z ---> System.Net.Http.HttpRequestException: Response status code does not indicate
success: 400 (BadRequest). ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException:
{"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter:
'password'.\r\nTrace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400\r\nCorrelation ID:
1fb19d9f-1a6f-4826-a38e-ed265328a3d0\r\nTimestamp: 2020-08-26 10:55:58Z","error_codes":[900144],"timestamp":"2020-08-26

10:55:58Z","trace_id":"c18d0b01-ef5b-4222-9094-c1421d3d3400","correlation_id":"1fb19d9f-1a6f-4826-a38e-ed265328a3d0","e
rror_uri":"https://login.partner.microsoftonline.cn/error?code=900144"}: Unknown error
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at
Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d__22`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d__21`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendHttpMessageAsync>d__72.Move
Next()
--- 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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendTokenRequestAsync>d__69.Mov
eNext()
--- 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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<CheckAndAcquireTokenUsingBroker
Async>d__59.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<RunAsync>d__57.MoveNext()
 ErrorCode: invalid_request
 StatusCode: 400
Connect-AzAccount : AADSTS900144: The request body must contain the following parameter: 'password'.
Trace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400
Correlation ID: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0
Timestamp: 2020-08-26 10:55:58Z
At line:1 char:1
+ Connect-AzAccount -Environment azurechinacloud -Credential $cred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Connect-AzAccount], AdalServiceException
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

DEBUG: AzureQoSEvent: CommandName - Connect-AzAccount; IsSuccess - False; Duration - 00:00:02.4514404;; Exception -
Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException: AADSTS900144: The request body must contain the
following parameter: 'password'.
Trace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400
Correlation ID: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0
Timestamp: 2020-08-26 10:55:58Z ---> System.Net.Http.HttpRequestException: Response status code does not indicate
success: 400 (BadRequest). ---> Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException:
{"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the following parameter:
'password'.\r\nTrace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400\r\nCorrelation ID:
1fb19d9f-1a6f-4826-a38e-ed265328a3d0\r\nTimestamp: 2020-08-26 10:55:58Z","error_codes":[900144],"timestamp":"2020-08-26

10:55:58Z","trace_id":"c18d0b01-ef5b-4222-9094-c1421d3d3400","correlation_id":"1fb19d9f-1a6f-4826-a38e-ed265328a3d0","e
rror_uri":"https://login.partner.microsoftonline.cn/error?code=900144"}: Unknown error
   --- End of inner exception stack trace ---
   --- End of inner exception stack trace ---
   at
Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d__22`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d__21`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendHttpMessageAsync>d__72.Move
Next()
--- 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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendTokenRequestAsync>d__69.Mov
eNext()
--- 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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<CheckAndAcquireTokenUsingBroker
Async>d__59.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<RunAsync>d__57.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonAsync>d__37.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.<AcquireTokenAsync>d__0.M
oveNext()
--- 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.AuthenticationResultToken.<GetAccessTokenAsync>d__11.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.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)
   at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureAccount account,
IAzureEnvironment environment, SecureString password, String promptBehavior, Action`1 promptAction)
   at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account, IAzureEnvironment
environment, String tenantId, String subscriptionId, String subscriptionName, SecureString password, Boolean
skipValidation, Action`1 promptAction, String name, Boolean shouldPopulateContextList, Int32 maxContextPopulation)
   at
Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass98_0.<ExecuteCmdlet>b__0(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()
 ErrorCode: invalid_request
 StatusCode: 400;
DEBUG: Finish sending metric.
DEBUG: 6:55:59 PM - ConnectAzureRmAccountCommand end processing.

Error output

PS C:\Users\user\Desktop> Resolve-AzError
WARNING: Breaking changes in the cmdlet 'Resolve-AzError' :
WARNING:  - The `Resolve-Error` alias will be removed in a future release.  Please change any scripts that use this
alias to use `Resolve-AzError` instead.

WARNING: 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: 20

Message        : AADSTS900144: The request body must contain the following parameter: 'password'.
                 Trace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400
                 Correlation ID: 1fb19d9f-1a6f-4826-a38e-ed265328a3d0
                 Timestamp: 2020-08-26 10:55:58Z
StackTrace     :    at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d
                 __22`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d
                 __21`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendHttp
                 MessageAsync>d__72.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendToke
                 nRequestAsync>d__69.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<CheckAnd
                 AcquireTokenUsingBrokerAsync>d__59.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<RunAsync
                 >d__57.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonAsync>d
                 __37.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.<A
                 cquireTokenAsync>d__0.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.AuthenticationResultToken.<GetAccessTokenAsync>d__11.M
                 oveNext()
                 --- 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.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzu
                 reAccount 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)
                    at
                 Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureAccount
                 account, IAzureEnvironment environment, SecureString password, String promptBehavior, Action`1
                 promptAction)
                    at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account,
                 IAzureEnvironment environment, String tenantId, String subscriptionId, String subscriptionName,
                 SecureString password, Boolean skipValidation, Action`1 promptAction, String name, Boolean
                 shouldPopulateContextList, Int32 maxContextPopulation)
                    at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass98_0.<ExecuteCmdl
                 et>b__0(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      : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 20

Message        : Response status code does not indicate success: 400 (BadRequest).
StackTrace     :
Exception      : System.Net.Http.HttpRequestException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 20

Message        : {"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the
                 following parameter: 'password'.\r\nTrace ID: c18d0b01-ef5b-4222-9094-c1421d3d3400\r\nCorrelation ID:
                 1fb19d9f-1a6f-4826-a38e-ed265328a3d0\r\nTimestamp: 2020-08-26
                 10:55:58Z","error_codes":[900144],"timestamp":"2020-08-26 10:55:58Z","trace_id":"c18d0b01-ef5b-4222-90
                 94-c1421d3d3400","correlation_id":"1fb19d9f-1a6f-4826-a38e-ed265328a3d0","error_uri":"https://login.pa
                 rtner.microsoftonline.cn/error?code=900144"}: Unknown error
StackTrace     :
Exception      : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 20

   HistoryId: 16

Message        : AADSTS900144: The request body must contain the following parameter: 'password'.
                 Trace ID: 2182f6ff-684c-4c0c-85b5-c97368583800
                 Correlation ID: 30c03682-a84e-4dfb-add5-1ba6c26e3269
                 Timestamp: 2020-08-26 10:54:44Z
StackTrace     :    at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d
                 __22`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d
                 __21`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendHttp
                 MessageAsync>d__72.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendToke
                 nRequestAsync>d__69.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<CheckAnd
                 AcquireTokenUsingBrokerAsync>d__59.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<RunAsync
                 >d__57.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonAsync>d
                 __37.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.<A
                 cquireTokenAsync>d__0.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.AuthenticationResultToken.<GetAccessTokenAsync>d__11.M
                 oveNext()
                 --- 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.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzu
                 reAccount 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)
                    at
                 Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureAccount
                 account, IAzureEnvironment environment, SecureString password, String promptBehavior, Action`1
                 promptAction)
                    at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account,
                 IAzureEnvironment environment, String tenantId, String subscriptionId, String subscriptionName,
                 SecureString password, Boolean skipValidation, Action`1 promptAction, String name, Boolean
                 shouldPopulateContextList, Int32 maxContextPopulation)
                    at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass98_0.<ExecuteCmdl
                 et>b__0(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      : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred -debug
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred -deb ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 16

Message        : Response status code does not indicate success: 400 (BadRequest).
StackTrace     :
Exception      : System.Net.Http.HttpRequestException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred -debug
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred -deb ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 16

Message        : {"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the
                 following parameter: 'password'.\r\nTrace ID: 2182f6ff-684c-4c0c-85b5-c97368583800\r\nCorrelation ID:
                 30c03682-a84e-4dfb-add5-1ba6c26e3269\r\nTimestamp: 2020-08-26
                 10:54:44Z","error_codes":[900144],"timestamp":"2020-08-26 10:54:44Z","trace_id":"2182f6ff-684c-4c0c-85
                 b5-c97368583800","correlation_id":"30c03682-a84e-4dfb-add5-1ba6c26e3269","error_uri":"https://login.pa
                 rtner.microsoftonline.cn/error?code=900144"}: Unknown error
StackTrace     :
Exception      : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred -debug
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred -deb ...
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 16

   HistoryId: 11

Message        : AADSTS900144: The request body must contain the following parameter: 'password'.
                 Trace ID: f42d9ddc-655a-433b-ba28-61ad5f053b00
                 Correlation ID: 3aab26e5-d24f-47af-bdc5-045580669d00
                 Timestamp: 2020-08-26 10:04:43Z
StackTrace     :    at Microsoft.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d
                 __22`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Http.AdalHttpClient.<GetResponseAsync>d
                 __21`1.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendHttp
                 MessageAsync>d__72.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<SendToke
                 nRequestAsync>d__69.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<CheckAnd
                 AcquireTokenUsingBrokerAsync>d__59.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.IdentityModel.Clients.ActiveDirectory.Internal.Flows.AcquireTokenHandlerBase.<RunAsync
                 >d__57.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContext.<AcquireTokenCommonAsync>d
                 __37.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.IdentityModel.Clients.ActiveDirectory.AuthenticationContextIntegratedAuthExtensions.<A
                 cquireTokenAsync>d__0.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.AuthenticationResultToken.<GetAccessTokenAsync>d__11.M
                 oveNext()
                 --- 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.Common.Authentication.Factories.AuthenticationFactory.Authenticate(IAzu
                 reAccount 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)
                    at
                 Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.ListAccountTenants(IAzureAccount
                 account, IAzureEnvironment environment, SecureString password, String promptBehavior, Action`1
                 promptAction)
                    at Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient.Login(IAzureAccount account,
                 IAzureEnvironment environment, String tenantId, String subscriptionId, String subscriptionName,
                 SecureString password, Boolean skipValidation, Action`1 promptAction, String name, Boolean
                 shouldPopulateContextList, Int32 maxContextPopulation)
                    at Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand.<>c__DisplayClass98_0.<ExecuteCmdl
                 et>b__0(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      : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalServiceException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 11

Message        : Response status code does not indicate success: 400 (BadRequest).
StackTrace     :
Exception      : System.Net.Http.HttpRequestException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 11

Message        : {"error":"invalid_request","error_description":"AADSTS900144: The request body must contain the
                 following parameter: 'password'.\r\nTrace ID: f42d9ddc-655a-433b-ba28-61ad5f053b00\r\nCorrelation ID:
                 3aab26e5-d24f-47af-bdc5-045580669d00\r\nTimestamp: 2020-08-26
                 10:04:43Z","error_codes":[900144],"timestamp":"2020-08-26 10:04:43Z","trace_id":"f42d9ddc-655a-433b-ba
                 28-61ad5f053b00","correlation_id":"3aab26e5-d24f-47af-bdc5-045580669d00","error_uri":"https://login.pa
                 rtner.microsoftonline.cn/error?code=900144"}: Unknown error
StackTrace     :
Exception      : Microsoft.IdentityModel.Clients.ActiveDirectory.AdalException
InvocationInfo : {Connect-AzAccount}
Line           : Connect-AzAccount -Environment azurechinacloud -Credential $cred
Position       : At line:1 char:1
                 + Connect-AzAccount -Environment azurechinacloud -Credential $cred
                 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 11

   HistoryId: 1

Message        : The following commands are already available on this
                 system:'Start-CopyAzureStorageBlob,Stop-CopyAzureStorageBlob'. This module 'Az.Storage' may override
                 the existing commands. If you still want to install this module 'Az.Storage', use -AllowClobber
                 parameter.
StackTrace     :
Exception      : System.Exception
InvocationInfo : {Install-Package}
Line           :             $null = PackageManagement\Install-Package @PSBoundParameters

Position       : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1809 char:21
                 + ...          $null = PackageManagement\Install-Package @PSBoundParameters
                 +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : 1

   HistoryId: -1

Message        : Unable to find type [Microsoft.PowerShell.Commands.PowerShellGet.Telemetry].
StackTrace     :    at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext
                 funcContext, Exception exception)
                    at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
                 frame)
                    at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame
                 frame)
Exception      : System.Management.Automation.RuntimeException
InvocationInfo : {}
Line           :     $telemetryMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | Get-Member
                 -Static).Name

Position       : At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:715 char:26
                 + ... yMethods = ([Microsoft.PowerShell.Commands.PowerShellGet.Telemetry] | ...
                 +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId      : -1

   HistoryId: 1

Message        : An error occurred stopping transcription: The host is not currently transcribing.
StackTrace     :    at Microsoft.PowerShell.Commands.StopTranscriptCommand.BeginProcessing()
                    at System.Management.Automation.Cmdlet.DoBeginProcessing()
                    at System.Management.Automation.CommandProcessorBase.DoBegin()
Exception      : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Stop-Transcript}
Line           : Stop-Transcript | out-null

Position       : At C:\Users\user\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:4 char:1
                 + Stop-Transcript | out-null
                 + ~~~~~~~~~~~~~~~
HistoryId      : 1

Message        : The host is not currently transcribing.
StackTrace     :    at System.Management.Automation.Host.PSHostUserInterface.StopTranscribing()
                    at Microsoft.PowerShell.Commands.StopTranscriptCommand.BeginProcessing()
Exception      : System.Management.Automation.PSInvalidOperationException
InvocationInfo : {Stop-Transcript}
Line           : Stop-Transcript | out-null

Position       : At C:\Users\user\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:4 char:1
                 + Stop-Transcript | out-null
                 + ~~~~~~~~~~~~~~~
HistoryId      : 1

The Azure PowerShell team is listening, please let us know how we are doing: https://aka.ms/azpssurvey?Q_CHL=ERROR.
dingmeng-xue commented 4 years ago

@sscchh2001 , could you share us how you created credential?

sscchh2001 commented 4 years ago

@dingmeng-xue , I use $cred = new-object -typename System.Management.Automation.PSCredential -argumentlist "UPN", (ConvertTo-SecureString "PASSWORD" -AsPlainText -Force) in powershell and store it in $profile, so every time I open a new session the $cred variable would be ready for use.

After clearing every context, if I login with Connect-AzAccount -Environment azurechinacloud -Credential $cred -Tenant <tenantID>, the login would succeed. The account I use has access to multiple tenants and dozens of subscriptions, not sure if this could be the cause.

dingmeng-xue commented 4 years ago

I tried Az.Accounts 1.9.3 and it can work in my environment. What's value of UPN? Is it a service principle? If you are using a service principle, it is used in a specific tenant. It cannot work if without tenant.

dingmeng-xue commented 4 years ago

Close this issue after a quick talk. Issue cannot be reproduced in clean environment.

datangleapin commented 3 years ago

oauthlib.oauth2.rfc6749.errors.InvalidClientIdError: (invalid_request) AADSTS900144: The request body must contain the following parameter: 'refresh_token'. Trace ID: 2bb25225-c720-4c1f-8e92-cd259c282602 Correlation ID: ca536010-2500-4c5e-95f0-ae2ed0044441 Timestamp: 2020-12-16 06:36:08Z