Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Set-EntraUserThumbnailPhoto

Set the thumbnail photo for a user.

Syntax

File (Default)

Set-EntraUserThumbnailPhoto

 -UserId <String>
 -FilePath <String>
 [<CommonParameters>]

Stream

Set-EntraUserThumbnailPhoto

 -FileStream <Stream>
 -UserId <String>
 [<CommonParameters>]

ByteArray

Set-EntraUserThumbnailPhoto

 -UserId <String>
 -ImageByteArray <Byte[]>
 [<CommonParameters>]

Description

The Set-EntraUserThumbnailPhoto cmdlet is used to set the thumbnail photo for a user.

Updating any user's photo in the organization requires the User.ReadWrite.All permission. Updating only the signed-in user's photo requires the User.ReadWrite permission.

Examples

Example 1: Sets the thumbnail photo

Connect-Entra -Scopes 'User.ReadWrite', 'User.ReadWrite.All'
Set-EntraUserThumbnailPhoto -UserId 'SawyerM@contoso.com' -FilePath 'D:\UserThumbnailPhoto.jpg'

This example sets the thumbnail photo of the user specified with the UserId parameter to the image specified with the FilePath parameter.

  • -UserId parameter specifies the ID of a user in Microsoft Entra ID.
  • -FilePath parameter specifies the file path of the image to be uploaded as the user thumbnail photo.

Parameters

-FilePath

The file path of the image to be uploaded as the user thumbnail photo.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

-UserId

The Object ID of the user for which the user thumbnail photo is set.

Parameter properties

Type:System.String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ObjectId, UPN, Identity, UserPrincipalName

Parameter sets

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.String

System.IO.Stream System.Byte[]

Outputs

System.Object

Related Links


Feedback

Was this page helpful?