question

KathyBlasco-4579 avatar image
0 Votes"
KathyBlasco-4579 asked saldana-msft edited

Getting error using Connect-MgGraph in PowerShell after running update-module

I updated my modules in PowerShell on 4/22/2021 and now when I try to execute:

 Connect-MgGraph -ClientID HIDDEN -TenantId HIDDEN -CertificateThumbprint HIDDEN 

I am getting the following error:

Connect-MgGraph : Could not load type 'System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler' from assembly 'System.IdentityModel.Tokens.Jwt,
Version=4.0.20622.1351, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.
At line:1 char:1
+ Connect-MgGraph -ClientID $env:PnPClientId -TenantId $env:PnPTenantId ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Connect-MgGraph], TypeLoadException
+ FullyQualifiedErrorId : Microsoft.Graph.PowerShell.Authentication.Cmdlets.ConnectMgGraph

Executing the connect statement prior to executing update-module, connected successfully.

microsoft.graph.authentication is now version 1.5.0

Does anyone have suggestions on how to fix this error so I can connect?

windows-server-powershellmicrosoft-graph-sdk
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

IanXue-MSFT avatar image
0 Votes"
IanXue-MSFT answered KathyBlasco-4579 commented

Hi,

Please help to report the issue over here
https://github.com/microsoftgraph/msgraph-sdk-powershell/issues

Best Regards,
Ian Xue
============================================
If the Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @IanXue-MSFT,

Github tiket submitted: 641


0 Votes 0 ·