Microsoft Azure Acr Token API

The AcrToken API from Microsoft Azure, for acrtoken.

GitHub OpenAPI

Operations 1

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

POST /oauth2/exchange Exchange an AAD token for an ACR refresh token · Microsoft Azure Post Oauth2 Exchange #
Ask an LLM
“Can I swap a Microsoft Entra access token for a container registry refresh token?”
“What grant types does the registry token exchange endpoint accept?”
Tell an agent
Exchange access token {access_token} for a refresh token for registry {service}.
Get an ACR refresh token for {service} using grant type {grant_type} in tenant {tenant}.

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/microsoft-azure:microsoft-azure-acrtoken-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

microsoft-azure-acrtoken-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure Azure Container Registry Acr Token API
  description: Metadata API definition for the Azure Container Registry runtime
  version: 2019-07-15-preview
security:
- registry_auth: []
  registry_oauth2: []
tags:
- name: AcrToken
paths:
  /oauth2/exchange:
    post:
      tags:
      - AcrToken
      description: Exchange AAD tokens for an ACR refresh Token
      operationId: microsoftAzureGetacrrefreshtokenfromexchange
      parameters:
      - $ref: '#/components/parameters/Grant_type'
      - $ref: '#/components/parameters/Service'
      - $ref: '#/components/parameters/Tenant'
      - $ref: '#/components/parameters/RefreshToken'
      - $ref: '#/components/parameters/AccessToken'
      responses:
        '200':
          description: Refresh token acquired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RefreshToken'
        default:
          description: ACR error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrErrors'
      security: []
      x-ms-examples:
        Exchange AAD Token for ACR Refresh:
          $ref: ./examples/PostRefreshToken.json
      summary: Microsoft Azure Post Oauth2 Exchange
components:
  parameters:
    AccessToken:
      name: access_token
      in: formData
      required: false
      description: AAD access token, mandatory when grant_type is access_token_refresh_token or access_token.
      type: string
      x-ms-parameter-location: method
    Grant_type:
      name: grant_type
      description: Can take a value of access_token_refresh_token, or access_token, or refresh_token
      type: string
      in: formData
      required: true
      enum:
      - access_token_refresh_token
      - access_token
      - refresh_token
      x-ms-parameter-location: method
    Tenant:
      name: tenant
      in: formData
      required: false
      description: AAD tenant associated to the AAD credentials.
      type: string
      x-ms-parameter-location: method
    Service:
      name: service
      in: formData
      required: true
      description: Indicates the name of your Azure container registry.
      type: string
      x-ms-parameter-location: method
    RefreshToken:
      name: refresh_token
      in: formData
      required: false
      description: AAD refresh token, mandatory when grant_type is access_token_refresh_token or refresh_token
      type: string
      x-ms-parameter-location: method
  schemas:
    AcrErrorInfo:
      description: Error information
      properties:
        code:
          description: Error code
          type: string
        message:
          type: string
          description: Error message
        detail:
          type: object
          description: Error details
    RefreshToken:
      type: object
      properties:
        refresh_token:
          description: The refresh token to be used for generating access tokens
          type: string
    AcrErrors:
      description: Acr error response describing why the operation failed
      properties:
        errors:
          type: array
          description: Array of detailed error
          items:
            $ref: '#/components/schemas/AcrErrorInfo'
  securitySchemes:
    registry_auth:
      type: http
      scheme: basic
    registry_oauth2:
      type: apiKey
      in: header
      name: Authorization
x-ms-parameterized-host:
  hostTemplate: '{url}'
  useSchemePrefix: false
  positionInOperation: first
  parameters:
  - $ref: '#/components/parameters/Url'
x-provenance:
  method: harvested
  publisher: Microsoft Azure
  source: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/containerregistry/data-plane/Microsoft.ContainerRegistry/preview/2019-07-15/containerregistry.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)