Skip to content

2.36.0+ breaks compatibility with azpowershell task in azure devops. #3569

@alphaz18

Description

@alphaz18

Describe the bug

azurepowershell task under azure devops pipelines uses az module which includes azure.identity.dll 1.13
but the new versions of microsoft.graph.authentication includes 1.18.
as such, its never loaded since az is loaded by default .
so all calls to say get-mgapplication, etc fails giving method not found errors.
##[error]Method not found: 'Void Microsoft.Graph.Authentication.AzureIdentityAccessTokenProvider..ctor(Azure.Core.TokenCredential, System.String[], Microsoft.Kiota.Authentication.Azure.ObservabilityOptions, Boolean, System.String[])'.

not sure where this should qualify as bug . but its certainly sucky.

Expected behavior

script running without Failing.

How to reproduce

Create script
Import-Module Microsoft.Graph.Authentication
Import-Module Microsoft.Graph.Applications
Connect-MgGraph -AccessToken "token"
get-mgapplication

run script in azurepowershell task. in a release pipeline in azure devops.

SDK Version

2.36.0+

Latest version known to work for scenario above?

2.35.0

Known Workarounds

temporary workaround: force removal of latest mgraph module and explicitly install/specify 2.35 modules to be used when doing azurepowershell tasks in devops

Debug output

Click to expand log ```
</details>


### Configuration

_No response_

### Other information

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:waiting-for-triageAn issue that is yet to be reviewed or assignedtype:bugA broken experience

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions