Microsoft Purview Default Account API

The DefaultAccount API from Microsoft Purview — 3 operation(s) for defaultaccount.

GitHub OpenAPI

Operations 3

GET /providers/Microsoft.Purview/getDefaultAccount Gets the default account information set for the scope #
POST /providers/Microsoft.Purview/setDefaultAccount Sets the default account for the scope #
POST /providers/Microsoft.Purview/removeDefaultAccount Removes the default account from the scope #

Documentation

📖
Documentation
https://learn.microsoft.com/en-us/rest/api/purview/
📖
Authentication
https://learn.microsoft.com/en-us/purview/tutorial-using-rest-apis
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/data-gov-api-create-assets
📖
Authentication
https://learn.microsoft.com/en-us/azure/active-directory/develop/v2-oauth2-client-creds-grant-flow
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/legacy/how-to-purview-custom-lineage-api-user-guide
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/legacy/tutorial-metadata-policy-collections-apis
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/purview/unified-catalog-api-overview
📖
Authentication
https://learn.microsoft.com/en-us/purview/data-gov-api-rest-data-plane
📖
Documentation
https://learn.microsoft.com/en-us/rest/api/purview/unified-catalog-data-quality
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/security-ediscovery-apioverview?view=graph-rest-1.0
📖
Authentication
https://learn.microsoft.com/en-us/graph/security-ediscovery-appauthsetup
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/edisc-ref-api-guide
📖
Documentation
https://learn.microsoft.com/en-us/graph/security-information-protection-overview
📖
Documentation
https://learn.microsoft.com/en-us/graph/security-datasecurityandgovernance-overview
📖
GettingStarted
https://learn.microsoft.com/en-us/purview/developer/use-the-api
📖
Documentation
https://learn.microsoft.com/en-us/graph/api/resources/security-recordsmanagement-overview?view=graph-rest-1.0

Specifications

Schemas & Data

Other Resources

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-purview:microsoft-purview-defaultaccount-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-purview-defaultaccount-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '2021-12-01'
  title: PurviewManagementClient Default Account API
  description: Creates a Microsoft.Purview management client.
servers:
- url: https://management.azure.com
security:
- azure_auth:
  - user_impersonation
tags:
- name: DefaultAccount
paths:
  /providers/Microsoft.Purview/getDefaultAccount:
    get:
      tags:
      - DefaultAccount
      summary: Gets the default account information set for the scope
      description: Get the default account for the scope.
      operationId: DefaultAccounts_Get
      parameters:
      - name: scopeTenantId
        in: query
        description: The tenant ID.
        required: true
        schema:
          type: string
          format: uuid
      - name: scopeType
        in: query
        description: The scope for the default account.
        required: true
        x-ms-enum:
          name: ScopeType
          modelAsString: true
        schema:
          type: string
          enum:
          - Tenant
          - Subscription
      - name: scope
        in: query
        description: The Id of the scope object, for example if the scope is "Subscription" then it is the ID of that subscription.
        required: false
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultAccountPayload'
        default:
          description: An error response received from the provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
  /providers/Microsoft.Purview/setDefaultAccount:
    post:
      tags:
      - DefaultAccount
      summary: Sets the default account for the scope
      description: Sets the default account for the scope.
      operationId: DefaultAccounts_Set
      parameters:
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DefaultAccountPayload'
        default:
          description: An error response received from the provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DefaultAccountPayload'
        description: The payload containing the default account information and the scope.
        required: true
  /providers/Microsoft.Purview/removeDefaultAccount:
    post:
      tags:
      - DefaultAccount
      summary: Removes the default account from the scope
      description: Removes the default account from the scope.
      operationId: DefaultAccounts_Remove
      parameters:
      - name: scopeTenantId
        in: query
        description: The tenant ID.
        required: true
        schema:
          type: string
          format: uuid
      - name: scopeType
        in: query
        description: The scope for the default account.
        required: true
        x-ms-enum:
          name: ScopeType
          modelAsString: true
        schema:
          type: string
          enum:
          - Tenant
          - Subscription
      - name: scope
        in: query
        description: The Id of the scope object, for example if the scope is "Subscription" then it is the ID of that subscription.
        required: false
        schema:
          type: string
      - $ref: '#/components/parameters/api-version'
      responses:
        '200':
          description: Success
        '204':
          description: Success
        default:
          description: An error response received from the provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
components:
  schemas:
    ErrorModel:
      description: Default error model
      type: object
      properties:
        code:
          description: Gets or sets the code.
          type: string
          readOnly: true
        details:
          description: Gets or sets the details.
          uniqueItems: false
          type: array
          items:
            $ref: '#/components/schemas/ErrorModel'
          x-ms-identifiers:
          - code
          readOnly: true
        message:
          description: Gets or sets the messages.
          type: string
          readOnly: true
        target:
          description: Gets or sets the target.
          type: string
          readOnly: true
    DefaultAccountPayload:
      description: Payload to get and set the default account in the given scope
      type: object
      properties:
        accountName:
          description: The name of the account that is set as the default.
          type: string
        resourceGroupName:
          description: The resource group name of the account that is set as the default.
          type: string
        scope:
          description: The scope object ID. For example, sub ID or tenant ID.
          type: string
        scopeTenantId:
          description: The scope tenant in which the default account is set.
          type: string
        scopeType:
          description: The scope where the default account is set.
          enum:
          - Tenant
          - Subscription
          type: string
          x-ms-enum:
            name: scopeType
            modelAsString: true
        subscriptionId:
          description: The subscription ID of the account that is set as the default.
          type: string
    ErrorResponseModel:
      description: Default error response model
      type: object
      properties:
        error:
          description: Gets or sets the error.
          allOf:
          - $ref: '#/components/schemas/ErrorModel'
          readOnly: true
  parameters:
    api-version:
      name: api-version
      in: query
      description: The api version to use.
      required: true
      schema:
        type: string
  securitySchemes:
    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.