msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

2.36.0+ breaks compatibility with azpowershell task in azure devops.

Open alphaz18 opened this issue 8 months ago • 2 comments

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_

alphaz18 avatar Mar 27 '26 21:03 alphaz18

Hi @alphaz18 , we have moved on to the latest version of azure identity for security purposes. Until AzurePowershell task upgrades their default version, the issue will persist. Your workaround will continue to work in the meantime until the task is upgraded.

One question though, which hosted runner is this task running on? It may be worthwhile to ensure that you are using the latest windows runner as it would be the most likely to have the dependencies up to date.

ramsessanchez avatar Mar 30 '26 19:03 ramsessanchez

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.