Microsoft Azure Access Token API

The Access Token API from Microsoft Azure, for access token.

GitHub OpenAPI

Operations 3

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/token Exchange a registry refresh token for an access token · Microsoft Azure Post Oauth2 Token #
Ask an LLM
“Can I trade a registry refresh token for a short-lived access token?”
“What grant type do I use to exchange a refresh token with the registry?”
Tell an agent
Exchange refresh token {refresh} for a registry access token on {service} with scope {scope}.
Swap refresh token {refresh} using grant type {grant} for service {service}, scope {scope}.
GET /oauth2/token Get a registry access token with credentials · Microsoft Azure Get Oauth2 Token #
Ask an LLM
“How do I get a Container Registry access token using my username and password?”
“Which service and scope do I pass when logging in for a registry access token?”
Tell an agent
Get a registry access token for service {service} with scope {scope} using my login.
Log in to registry {service} and issue a token scoped to {scope}.
POST /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VideoIndexer/accounts/{accountName}/generateAccessToken Generate a Video Indexer access token · Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups… #
Ask an LLM
“How do I generate an access token for an Azure Video Indexer account?”
“Can I scope a Video Indexer token to a single video or project?”
Tell an agent
Generate a {permission} Video Indexer token for account {account} with scope {scope}.
Create a {permission} token for Video Indexer account {account}, scope {scope}, video {video}.

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-access-token-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-access-token-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Microsoft Azure Azure Container Registry Access Token API
  description: Metadata API definition for the Azure Container Registry runtime
  version: 2019-07-15-preview
security:
- registry_auth: []
  registry_oauth2: []
tags:
- name: Access Token
paths:
  /oauth2/token:
    post:
      tags:
      - Access Token
      description: Exchange ACR Refresh token for an ACR Access Token
      operationId: microsoftAzureGetacraccesstoken
      parameters:
      - $ref: '#/components/parameters/Service'
      responses:
        '200':
          description: Access token acquired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        default:
          description: ACR error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrErrors'
      security: []
      x-ms-examples:
        Get Access Token with Refresh Token:
          $ref: ./examples/PostAccessToken.json
      summary: Microsoft Azure Post Oauth2 Token
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                grant_type:
                  type: string
                  enum:
                  - refresh_token
                  description: Grant type is expected to be refresh_token
                scope:
                  type: string
                  description: Which is expected to be a valid scope, and can be specified more than once for multiple scope requests. You obtained this from the Www-Authenticate response header from the challenge.
                refresh_token:
                  type: string
                  description: Must be a valid ACR refresh token
              required:
              - grant_type
              - scope
              - refresh_token
    get:
      tags:
      - Access Token
      description: Exchange Username, Password and Scope an ACR Access Token
      operationId: microsoftAzureGetacraccesstokenfromlogin
      parameters:
      - name: service
        in: query
        required: true
        description: Indicates the name of your Azure container registry.
        schema:
          type: string
      - name: scope
        in: query
        required: true
        description: Expected to be a valid scope, and can be specified more than once for multiple scope requests. You can obtain this from the Www-Authenticate response header from the challenge.
        schema:
          type: string
      responses:
        '200':
          description: Access token acquired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        default:
          description: ACR error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrErrors'
      security:
      - registry_auth: []
      x-ms-examples:
        Get Access Token with username and password:
          $ref: ./examples/GetAccessToken.json
      summary: Microsoft Azure Get Oauth2 Token
  ? /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VideoIndexer/accounts/{accountName}/generateAccessToken
  : post:
      tags:
      - Access Token
      operationId: microsoftAzureGenerateAccesstoken
      description: Generate an Azure Video Indexer access token.
      x-ms-examples:
        'Generate accessToken for video contributor #1':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoContributerAccessToken1.json
        'Generate accessToken for video contributor #2':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoContributerAccessToken2.json
        'Generate accessToken for video reader #1':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoReaderAccessToken1.json
        'Generate accessToken for video reader #2':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateVideoReaderAccessToken2.json
        'Generate accessToken for project contributor #1':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectContributerAccessToken1.json
        'Generate accessToken for project contributor #2':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectContributerAccessToken2.json
        'Generate accessToken for project reader #1':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectReaderAccessToken1.json
        'Generate accessToken for project reader #2':
          $ref: ./examples/ViGenerateAccessToken/ViGenerateProjectReaderAccessToken2.json
        Generate accessToken for account contributor:
          $ref: ./examples/ViGenerateAccessToken/ViGenerateAccountContributerAccessToken.json
        Generate accessToken for account reader:
          $ref: ./examples/ViGenerateAccessToken/ViGenerateAccountReaderAccessToken.json
      parameters:
      - $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/SubscriptionIdParameter
      - $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ResourceGroupNameParameter
      - $ref: '#/components/parameters/AccountNameParameter'
      - $ref: ../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter
      responses:
        '200':
          description: The Azure Video Indexer account's access token properties were retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccessToken'
        '400':
          description: Bad Request.
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: Conflict
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          x-ms-error-response: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        default:
          description: Error response describing why the operation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      summary: Microsoft Azure Post Subscriptions Subscriptionid Resourcegroups…
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateAccessTokenParameters'
        description: The parameters for generating access token
components:
  parameters:
    Service:
      name: service
      in: formData
      required: true
      description: Indicates the name of your Azure container registry.
      type: string
      x-ms-parameter-location: method
    AccountNameParameter:
      name: accountName
      in: path
      required: true
      description: The name of the Azure Video Indexer account.
      x-ms-parameter-location: method
      schema:
        type: string
        maxLength: 50
        minLength: 3
        pattern: ^[A-Za-z0-9-]+$
  schemas:
    AccessToken:
      type: object
      properties:
        access_token:
          description: The access token for performing authenticated requests
          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'
    AcrErrorInfo:
      description: Error information
      properties:
        code:
          description: Error code
          type: string
        message:
          type: string
          description: Error message
        detail:
          type: object
          description: Error details
    ErrorResponse:
      description: Error response.
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDefinition'
          description: The error details.
    ErrorDefinition:
      description: Error definition.
      type: object
      properties:
        code:
          description: Service specific error code which serves as the substatus for the HTTP error code.
          type: string
          readOnly: true
        message:
          description: Description of the error.
          type: string
          readOnly: true
        details:
          description: Internal error details.
          type: array
          items:
            $ref: '#/components/schemas/ErrorDefinition'
          readOnly: true
    GenerateAccessTokenParameters:
      description: Access token generation request's parameters
      type: object
      required:
      - permissionType
      - scope
      properties:
        permissionType:
          type: string
          description: The requested permission
          enum:
          - Contributor
          - Reader
          x-ms-enum:
            name: permissionType
            modelAsString: true
        scope:
          type: string
          description: The requested media type
          enum:
          - Video
          - Account
          - Project
          x-ms-enum:
            name: scope
            modelAsString: true
        videoId:
          description: The video ID
          type: string
          example: 07ec9e38d4
        projectId:
          description: The project ID
          type: string
  securitySchemes:
    registry_auth:
      type: http
      scheme: basic
    registry_oauth2:
      type: apiKey
      in: header
      name: Authorization
    azure_auth:
      type: oauth2
      flows:
        implicit:
          scopes:
            user_impersonation: impersonate your user account
          authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
      description: Azure Active Directory OAuth2 Flow
x-ms-parameterized-host:
  hostTemplate: '{url}'
  useSchemePrefix: false
  positionInOperation: first
  parameters:
  - $ref: '#/components/parameters/Url'