Office365itpros icon indicating copy to clipboard operation
Office365itpros copied to clipboard

Get-GraphData error - The specified value is not valid in the 'SslPro tocolType' enumeration

Open joostvdlinden opened this issue 6 months ago • 1 comments

First of all, thanks for all the efforts put into creating this script. It is very useful.

When I try to run the script I get the following error upon quite a lot of goups:

Get-GraphData : System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.ArgumentException: The specified value is not valid in the 'SslPro tocolType' enumeration. Parameter name: sslProtocolType at System.Net.Security.SslState.ValidateCreateContext(Boolean isServer, String targetHost, SslProtocols enabledSslProtocols, X509Certificate serverCertificate, X509CertificateCollection clientCerti ficates, Boolean remoteCertRequired, Boolean checkCertRevocationStatus, Boolean checkCertName) at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result) at System.Net.TlsStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback asyncCallback, Object asyncState) at System.Net.ConnectStream.WriteHeaders(Boolean async) --- End of inner exception stack trace --- at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request) at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord() At line:570 char:28

  • ... $TeamDetails = Get-GraphData -AccessToken $Token -Uri $Uri
  •                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
    • FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Get-GraphData

The issue does not persist for all groups.

Would this be a local issue on my machine? If so, what could I do to resolve this issue?

joostvdlinden avatar Aug 27 '24 08:08 joostvdlinden