Microsoft Entra ID (formerly Azure AD) Users.profile Photo API

The users.profilePhoto API from Microsoft Entra ID (formerly Azure AD) — 5 operation(s) for users.profilephoto.

Operations 11

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /users/{user-id}/photo Get a user's main profile photo metadata · Get photo from users #
Ask an LLM
“Does this user have a profile photo set, and what size is their main one?”
“What is the height and width of someone's primary profile picture?”
Tell an agent
Get the main profile photo details for user {user_id}.
Show only the {fields} of {user_id}'s primary profile photo.
PATCH /users/{user-id}/photo Update a user's profile photo properties · Update the navigation property photo in users #
Ask an LLM
“Can I change the recorded height and width on a user's photo metadata?”
“Which profile photo fields are editable apart from the image itself?”
Tell an agent
Set the photo metadata for user {user_id} to height {height} and width {width}.
Update the profile photo properties on {user_id}.
DELETE /users/{user-id}/photo Remove a user's profile photo record · Delete navigation property photo for users #
Ask an LLM
“Can I delete the profile photo object for a user altogether?”
“What removes the photo navigation property from someone's account?”
Tell an agent destructive · confirm first
Delete the profile photo record for user {user_id}.
Remove the photo property from user {user_id} with ETag {etag}.
GET /users/{user-id}/photo/$value Download a user's profile picture · Get media content for the navigation property photo from users #
Ask an LLM
“How do I download the actual image bytes of a colleague's profile picture?”
“Can I show a user's avatar in my app by fetching their photo binary?”
Tell an agent
Download the profile picture image for user {user_id}.
Save {user_id}'s avatar to a file.
PUT /users/{user-id}/photo/$value Upload a new profile picture for a user · Update media content for the navigation property photo in users #
Ask an LLM
“How do I upload a new profile picture for someone in my organization?”
“Can I replace a user's avatar with a JPEG from our HR system?”
Tell an agent
Upload this image as the profile picture for user {user_id}.
Replace {user_id}'s avatar with the attached photo.
DELETE /users/{user-id}/photo/$value Delete a user's profile picture image · Delete media content for the navigation property photo in users #
Ask an LLM
“How do I clear a user's profile picture so the default initials show again?”
“Can I remove just the image content of someone's main photo?”
Tell an agent destructive · confirm first
Delete the profile picture image for user {user_id}.
Clear the avatar image on {user_id}.
GET /users/{user-id}/photos List a user's profile photo sizes · Get photos from users #
Ask an LLM
“Which sizes of a user's profile photo are available?”
“Can I get all the different resolutions of someone's avatar in one call?”
Tell an agent
List the available profile photo sizes for user {user_id}.
Show the photo size variants for {user_id} filtered by {filter}.
GET /users/{user-id}/photos/{profilePhoto-id} Get details of one photo size for a user · Get photos from users #
Ask an LLM
“What are the height and width of one specific photo size a user has?”
“Can I read the metadata of a single sized user photo without downloading the image?”
Tell an agent
Get the metadata for photo size {photo_id} of user {user_id}.
Show only {fields} for sized photo {photo_id} in {user_id}'s photo collection.
GET /users/{user-id}/photos/{profilePhoto-id}/$value Download a specific size of a user's photo · Get media content for the navigation property photos from users #
Ask an LLM
“Can I download a small thumbnail version of a user's avatar instead of the full image?”
“How do I fetch the image bytes of one specific photo size?”
Tell an agent
Download the {photo_id} size image of user {user_id}'s photo.
Save the {photo_id} thumbnail of {user_id}'s avatar.
PUT /users/{user-id}/photos/{profilePhoto-id}/$value Upload the image for one photo size · Update media content for the navigation property photos in users #
Ask an LLM
“Can I upload an image for just one specific size of a user's photo?”
“How do I replace a single size variant of someone's avatar?”
Tell an agent
Upload this image as the {photo_id} size of user {user_id}'s photo.
Replace the {photo_id} variant image for {user_id}.
DELETE /users/{user-id}/photos/{profilePhoto-id}/$value Delete the image for one photo size · Delete media content for the navigation property photos in users #
Ask an LLM
“Can I delete the image content of only one size variant of a user's photo?”
“How do I remove a single thumbnail size from someone's avatar set?”
Tell an agent destructive · confirm first
Delete the {photo_id} size image from user {user_id}'s photos.
Clear the {photo_id} variant image for {user_id}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/azure-ad:azure-ad-users-profilephoto-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

azure-ad-users-profilephoto-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Users.profile Photo API
  version: v1.0
servers:
- url: https://graph.microsoft.com/v1.0/
  description: Core
security:
- azureaadv2: []
tags:
- name: users.profilePhoto
paths:
  /users/{user-id}/photo:
    get:
      tags:
      - users.profilePhoto
      summary: Get photo from users
      description: The user's profile photo. Read-only.
      operationId: user_GetPhoto
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Retrieved navigation property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.profilePhoto'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
      - users.profilePhoto
      summary: Update the navigation property photo in users
      operationId: user_UpdatePhoto
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      requestBody:
        description: New navigation property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.profilePhoto'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.profilePhoto'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
      - users.profilePhoto
      summary: Delete navigation property photo for users
      operationId: user_DeletePhoto
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - name: If-Match
        in: header
        description: ETag
        style: simple
        schema:
          type: string
      responses:
        2XX:
          description: Success
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /users/{user-id}/photo/$value:
    get:
      tags:
      - users.profilePhoto
      summary: Get media content for the navigation property photo from users
      description: The user's profile photo. Read-only.
      operationId: user_GetPhotoContent
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      responses:
        2XX:
          description: Retrieved media content
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/error'
    put:
      tags:
      - users.profilePhoto
      summary: Update media content for the navigation property photo in users
      description: The user's profile photo. Read-only.
      operationId: user_SetPhotoContent
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      requestBody:
        description: New media content.
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
        required: true
      responses:
        2XX:
          description: Success
        default:
          $ref: '#/components/responses/error'
    delete:
      tags:
      - users.profilePhoto
      summary: Delete media content for the navigation property photo in users
      description: The user's profile photo. Read-only.
      operationId: user_DeletePhotoContent
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - name: If-Match
        in: header
        description: ETag
        style: simple
        schema:
          type: string
      responses:
        2XX:
          description: Success
        default:
          $ref: '#/components/responses/error'
  /users/{user-id}/photos:
    get:
      tags:
      - users.profilePhoto
      summary: Get photos from users
      description: The collection of the user's profile photos in different sizes. Read-only.
      operationId: user_ListPhoto
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - $ref: '#/components/parameters/top'
      - $ref: '#/components/parameters/skip'
      - $ref: '#/components/parameters/search'
      - $ref: '#/components/parameters/filter'
      - $ref: '#/components/parameters/count'
      - name: $orderby
        in: query
        description: Order items by property values
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          $ref: '#/components/responses/microsoft.graph.profilePhotoCollectionResponse'
        default:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
  /users/{user-id}/photos/{profilePhoto-id}:
    get:
      tags:
      - users.profilePhoto
      summary: Get photos from users
      description: The collection of the user's profile photos in different sizes. Read-only.
      operationId: getUsersByUserIdPhotosByProfilePhotoId
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - name: profilePhoto-id
        in: path
        description: The unique identifier of profilePhoto
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: profilePhoto
      - name: $select
        in: query
        description: Select properties to be returned
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      - name: $expand
        in: query
        description: Expand related entities
        style: form
        explode: false
        schema:
          uniqueItems: true
          type: array
          items:
            type: string
      responses:
        2XX:
          description: Retrieved navigation property
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.profilePhoto'
        default:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
      x-operation-id-source: normalized
      x-operation-id-original: user_GetPhoto
  /users/{user-id}/photos/{profilePhoto-id}/$value:
    get:
      tags:
      - users.profilePhoto
      summary: Get media content for the navigation property photos from users
      description: The unique identifier for an entity. Read-only.
      operationId: user_GetPhotosContent
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - name: profilePhoto-id
        in: path
        description: The unique identifier of profilePhoto
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: profilePhoto
      responses:
        2XX:
          description: Retrieved media content
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        default:
          $ref: '#/components/responses/error'
    put:
      tags:
      - users.profilePhoto
      summary: Update media content for the navigation property photos in users
      description: The unique identifier for an entity. Read-only.
      operationId: user_SetPhotosContent
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - name: profilePhoto-id
        in: path
        description: The unique identifier of profilePhoto
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: profilePhoto
      requestBody:
        description: New media content.
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
        required: true
      responses:
        2XX:
          description: Success
        default:
          $ref: '#/components/responses/error'
    delete:
      tags:
      - users.profilePhoto
      summary: Delete media content for the navigation property photos in users
      description: The unique identifier for an entity. Read-only.
      operationId: user_DeletePhotosContent
      parameters:
      - name: user-id
        in: path
        description: The unique identifier of user
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: user
      - name: profilePhoto-id
        in: path
        description: The unique identifier of profilePhoto
        required: true
        style: simple
        schema:
          type: string
        x-ms-docs-key-type: profilePhoto
      - name: If-Match
        in: header
        description: ETag
        style: simple
        schema:
          type: string
      responses:
        2XX:
          description: Success
        default:
          $ref: '#/components/responses/error'
components:
  parameters:
    count:
      name: $count
      in: query
      description: Include count of items
      style: form
      explode: false
      schema:
        type: boolean
    search:
      name: $search
      in: query
      description: Search items by search phrases
      style: form
      explode: false
      schema:
        type: string
    top:
      name: $top
      in: query
      description: Show only the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
      example: 50
    skip:
      name: $skip
      in: query
      description: Skip the first n items
      style: form
      explode: false
      schema:
        minimum: 0
        type: integer
    filter:
      name: $filter
      in: query
      description: Filter items by property values
      style: form
      explode: false
      schema:
        type: string
  schemas:
    microsoft.graph.entity:
      title: entity
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for an entity. Read-only.
      additionalProperties:
        type: object
    microsoft.graph.ODataErrors.InnerError:
      type: object
      additionalProperties:
        type: object
      description: The structure of this object is service-specific
    microsoft.graph.ODataErrors.ODataError:
      required:
      - error
      type: object
      properties:
        error:
          $ref: '#/components/schemas/microsoft.graph.ODataErrors.MainError'
      additionalProperties:
        type: object
    microsoft.graph.ODataErrors.MainError:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
          x-ms-primary-error-message: true
        target:
          type:
          - string
          - 'null'
        details:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ErrorDetails'
        innerError:
          $ref: '#/components/schemas/microsoft.graph.ODataErrors.InnerError'
      additionalProperties:
        type: object
    microsoft.graph.profilePhoto:
      allOf:
      - $ref: '#/components/schemas/microsoft.graph.entity'
      - title: profilePhoto
        type: object
        properties:
          height:
            maximum: 2147483647
            minimum: -2147483648
            type:
            - number
            - 'null'
            description: The height of the photo. Read-only.
            format: int32
          width:
            maximum: 2147483647
            minimum: -2147483648
            type:
            - number
            - 'null'
            description: The width of the photo. Read-only.
            format: int32
        additionalProperties:
          type: object
    microsoft.graph.profilePhotoCollectionResponse:
      title: Collection of profilePhoto
      type: object
      properties:
        value:
          type: array
          items:
            $ref: '#/components/schemas/microsoft.graph.profilePhoto'
        '@odata.nextLink':
          type:
          - string
          - 'null'
      additionalProperties:
        type: object
    microsoft.graph.ODataErrors.ErrorDetails:
      required:
      - code
      - message
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        target:
          type:
          - string
          - 'null'
      additionalProperties:
        type: object
  responses:
    error:
      description: error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError'
    microsoft.graph.profilePhotoCollectionResponse:
      description: Retrieved collection
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.profilePhotoCollectionResponse'
  securitySchemes:
    azureaadv2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/v2.0/authorize
          tokenUrl: https://login.microsoftonline.com/common/oauth2/v2.0/token
          scopes: {}