Skip to content

Az.Accounts 5.3.2 and 5.3.3 fail to work with PS 5.1 in Azure Automation runbook #29276

@MSNina123456

Description

@MSNina123456

Description

Connect-Az.Accounts fails in PS 5.1 with Az.Accounts 5.3.2 or 5.3.3 for cloud jobs

Connect-AzAccount : Method 'GetTokenAsync' in type 'Azure.Identity.ManagedIdentityCredential' from assembly 'Azure.Identity, Version=1.13.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' does not have an implementation. At line:5 char:1 + Connect-AzAccount -Identity + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : CloseError: (:) [Connect-AzAccount], TypeLoadException + FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand

The issue is reproduceable with Az.Accounts 5.3.2 and 5.3.3, same command works well with PS 7.4 in same Automation account

Issue script & Debug output

Directory: C:\usr\src\PSModules
ModuleType Version    Name                                ExportedCommands                                              
---------- -------    ----                                ----------------                                              
Script     5.3.3      Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enabl...

    Directory: C:\AzAt\Modules\11.2.0


ModuleType Version    Name                                ExportedCommands                                              
---------- -------    ----                                ----------------                                              
Script     2.15.0     Az.Accounts                         {Disable-AzDataCollection, Disable-AzContextAutosave, Enabl...

    Directory: C:\usr\src\PSModules


ModuleType Version    Name                                ExportedCommands                                              
---------- -------    ----                                ----------------                                              
Script     9.6.0      Az.Storage                          {Add-AzRmStorageContainerLegalHold, Add-AzStorageAccountMan...

    Directory: C:\AzAt\Modules\11.2.0


ModuleType Version    Name                                ExportedCommands                                              
---------- -------    ----                                ----------------                                              
Script     6.1.0      Az.Storage                          {Add-AzRmStorageContainerLegalHold, Add-AzStorageAccountMan...


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




Mode             : Process
ContextDirectory : None
ContextFile      : None
CacheDirectory   : None
CacheFile        : None
KeyStoreFile     : None
Settings         : {[InstallationId, **]}

Environment data

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

Module versions

Az.Accounts 5.3.3 or 5.3.2

Error output

Metadata

Metadata

Assignees

Labels

AccountsIssues in Az.Accounts except authentication relatedPossible-SolutionSimilar-Issueact-identity-squadassembly-conflictrelated to conflicts when loading assembliesbugThis issue requires a change to an existing behavior in the product in order to be resolved.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions