Edit

Share via


Get-EntraUserThumbnailPhoto

Retrieve the thumbnail photo of a user.

Syntax

Get-EntraUserThumbnailPhoto
   -UserId <String>
   [-FileName <String>]
   [-FilePath <String>]
   [-View <Boolean>]
   [-Property <String[]>]
   [<CommonParameters>]

Description

Retrieve the thumbnail photo of a user.

Examples

Example 1: Retrieve thumbnail photo by Id

Connect-Entra -Scopes 'User.Read','User.Read.All'
Get-EntraUserThumbnailPhoto -UserId 'SawyerM@contoso.com'

Id      Height Width
--      ------ -----
default 292    278

This example shows how to retrieve the thumbnail photo of a user that is specified through the value of the UserId parameter.

  • -UserId parameter specifies the user for which the thumbnail photo is retrieved.

Parameters

-FileName

Specifies the file name to save the retrieved thumbnail photo.

Type:System.String
Aliases:None
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-FilePath

Specifies the file path or ___location where the thumbnail photo will be saved.

Type:System.String
Aliases:None
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Property

Specifies properties to be returned

Type:System.String[]
Aliases:Select
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-UserId

The object ID of the user for which the thumbnail photo is retrieved.

Type:System.String
Aliases:ObjectId, UPN, Identity, UserPrincipalName
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-View

Specifies whether to view the thumbnail photo immediately after retrieval.

Type:System.Boolean
Aliases:None
Position:Named
Default value:False
Required:False
Accept pipeline input:True
Accept wildcard characters:False

Inputs

System.String

System.Boolean

Outputs

System.Object