Hello Patrick Bus
Thank you for reaching out to Microsoft Q&A.
Below are the resolution steps: -
1.) Roll back to v2.33.0
Microsoft explicitly recommends pinning to a known-good minor version inside Azure Automation.
Step 1: Remove v2.34.0
Remove-Module Microsoft.Graph.Authentication -Force
Step 2: Import v2.33.0 explicitly
Install``` -Module Microsoft.Graph.Authentication ``
``` -RequiredVersion 2.33.0 ``
``` -Repository PSGallery ``
``` -Force ``
``-AllowClobber
Step 3: Restart the Automation Account worker
Re-run the job (cold start occurs automatically)
Connect-MgGraph -Identity will work again.
2.) Import the full Microsoft.Graph bundle
In some tenants, importing only Microsoft.Graph.Authentication causes dependency mismatch.
Install``-Module Microsoft.Graph -RequiredVersion 2.33.0 -Force
Then in your runbook:
Import``-Module Microsoft.Graph
Connect``-MgGraph -Identity -NoWelcome
Microsoft docs for your reference: -
https://learn.microsoft.com/en-us/azure/automation/shared-resources/modules#specify-a-module-version
If the resolution was helpful, do click Accept the Answer and Yes and upvote it 👍 for was this answer helpful, which may help members with similar questions.
Thank you for helping to improve Microsoft Q&A!