Share via

Random SSL errors when using Set-MgUserPhotoContent

Vlatko Danchev 0 Reputation points
2024-02-26T15:41:36.1133333+00:00

A week ago Set-MgUserPhotoContent was working as expected when uploading pictures in a batch job for our employees. However, starting from yesterday, it started throwing SSL errors randomly. Details: Powershell version: 7.4.1 Microsoft Graph module version: 2.15.0, 2.11.1 (confirmed the same bug with both) Here's one such error:


Exception             : System.Exception: [InternalServerError] : The SSL connection could not be established, see inner exception.
TargetObject          : { UserId = <REDACTED>, Headers = , body = System.IO.FileStream, ContentType =  }
CategoryInfo          : InvalidOperation: ({ UserId = <REDACTED>, ContentType =  }:<>f__AnonymousType59`4) [Set-MgUserPhotoContent_Set], Exception
FullyQualifiedErrorId : InternalServerError,Microsoft.Graph.PowerShell.Cmdlets.SetMgUserPhotoContent_Set
ErrorDetails          : The SSL connection could not be established, see inner exception.
                        
                        Status: 500 (InternalServerError)
                        ErrorCode: InternalServerError
                        Date: 2024-02-26T15:23:48
                        
                        Headers:
                        Transfer-Encoding             : chunked
                        Vary                          : Accept-Encoding
                        Strict-Transport-Security     : max-age=31536000
                        request-id                    : 5a4b5b09-2734-49cb-85ec-b543baf8d03b
                        client-request-id             : 53a6ea22-7157-4b9e-837f-d7ad5cba338a
                        x-ms-ags-diagnostic           : {"ServerInfo":{"DataCenter":"<REDACTED>","Slice":"<REDACTED>","Ring":"<REDACTED>","ScaleUnit":"<REDACTED>","RoleInstance":"<REDACTED>"}}
                        Date                          : Mon, 26 Feb 2024 15:23:48 GMT
                        
                        
InvocationInfo        : System.Management.Automation.InvocationInfo
ScriptStackTrace      : at Set-MgUserPhotoContent<Process>, C:\Program Files\WindowsPowerShell\Modules\Microsoft.Graph.Users\2.15.0\exports\ProxyCmdletDefinitions.ps1: line 49351
                        at <REDACTED>, <REDACTED>.ps1: line 222
                        at <ScriptBlock>, <REDACTED>.ps1: line 469
PipelineIterationInfo : {}
PSMessageDetails      : 
Microsoft Security | Microsoft Graph
0 comments No comments

1 answer

Sort by: Most helpful
  1. Vlatko Danchev 0 Reputation points
    2024-02-27T12:28:42.8066667+00:00

    Hm, seems to be working fine now - will verify later on.

    Was this answer helpful?

    0 comments No comments

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.