Set-EntraBetaUserThumbnailPhoto
Set the thumbnail photo for a user.
Syntax
Set-EntraBetaUserThumbnailPhoto
-FilePath <String>
[-UserId <String>]
[<CommonParameters>]
Set-EntraBetaUserThumbnailPhoto
-ImageByteArray <Byte[]>
[-UserId <String>]
[<CommonParameters>]
Set-EntraBetaUserThumbnailPhoto
-FileStream <Stream>
[-UserId <String>]
[<CommonParameters>]
Description
The Set-EntraBetaUserThumbnailPhoto
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-EntraBetaUserThumbnailPhoto -UserId -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.
Type: | System.String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FileStream
A filestream that contains the user thumbnail photo.
Type: | System.Stream |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ImageByteArray
An Image Byte Array that contains the user thumbnail photo.
Type: | System.Byte[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-UserId
The Object ID of the user for which the user thumbnail photo is set.
Type: | System.String |
Aliases: | ObjectId |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
System.String
System.IO.Stream System.Byte[]
Outputs
System.Object