3.1.5.1.1 GetUserPhoto

The GetUserPhoto operation retrieves the profile image for a mailbox.

 https://<Exchange Server>/ews/Exchange.asmx/s/GetUserPhoto?email=<email address>&size=<size code>

The Autodiscover service GetUserSetting WSDL operation, as specified in [MS-OXWSADISC], is used to retrieve the ExternalPhotosUrl setting, which contains the URL of the web service endpoint and the location of the Exchange.asmx HTTP handler that returns the user images.

email: Represents the email address of the user account.

size: Contains the size code of the user image. The following table describes possible values. The size code always returns the directory service thumbnail image if it is available as long as no image is stored on the server.

Size code

Description

HR48x48

The image is 48 pixels high and 48 pixels wide.

HR64x64

The image is 64 pixels high and 64 pixels wide.

HR96x96

The image is 96 pixels high and 96 pixels wide.

HR120x120

The image is 120 pixels high and 120 pixels wide.

HR240x240

The image is 240 pixels high and 240 pixels wide.

HR360x360

The image is 360 pixels high and 360 pixels wide.

HR432x432

The image is 432 pixels high and 432 pixels wide.

HR504x504

The image is 504 pixels high and 504 pixels wide.

HR648x648

The image is 648 pixels high and 648 pixels wide.

If the request specifies a size that is not available, the operation returns the largest available photo. If no image is stored on the server, the operation returns the thumbnail image stored in the directory service. The thumbnail image is not necessarily square, even if the size code specifies a square image.

The Accept header, as specified in [RFC2616], is not processed by the server.

Response:

The requested image is returned in the payload of the HTTP response. The type of the image is indicated by the Content-Type header, as specified in [RFC2616]. Optionally, the ETag header, as specified in [RFC2616], is also returned.