Graph module 2.26.0 for PowerShell error with Connect-MgGraph

Xinyi Li 20 Reputation points Microsoft Employee
2025-02-26T04:31:24.22+00:00

When I install Microsoft.Graph(2.26.0) and my app I will get error "Connect-MgGraph : The type initializer for 'Azure.Identity.AuthenticationRecord' threw an exception.".

When I install Microsoft.Graph(2.25.0) and my app, Connect-MgGraph can work.

When I install Microsoft.Graph(2.26.0) only, it can work, can you give some possible reason that may cause this issue? What change in Microsoft.Graph could cause this?

Microsoft Security | Microsoft Graph
0 comments No comments

Answer accepted by question author
Anonymous
2025-02-26T05:36:06.9266667+00:00

Hello Xinyi Li,

Thank you for reaching out to Microsoft Support!

As for the problem with 2.26.0 version, we have received feedback from many users using this version. Since the module of this version is a newer version, it may not be stable and there are some problems.

To address this issue, you can try the following steps:

Revert to Version 2.25.0: Since you mentioned that version 2.25.0 works fine, you can continue using this version until the issue is resolved.

Report the Issue: Please consider reporting the issue here so that the developers can investigate and provide a fix.

Hope this helps.

If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.