Microsoft Graph Domain DNS Records

Microsoft Graph domain DNS records are the programmatic way to discover and manage the DNS settings Microsoft 365 expects for a custom domain. When you add a domain, Graph exposes two main sets of records: verificationDnsRecords (typically TXT or MX) used to prove ownership, and serviceConfigurationRecords (MX, CNAME, TXT, SRV) used to configure services like Exchange Online (mail flow and Autodiscover), Teams/Skype, and device management.

OpenAPI Specification

domaindnsrecords-openapi-original.yml Raw ↑
openapi: 3.1.0
info:
  title: Microsoft Graph Domaindnsrecords
  description: Needs a description.
paths:
  /domainDnsRecords:
    description: Provides operations to manage the collection of domainDnsRecord entities.
    get:
      tags:
        - domainDnsRecords.domainDnsRecord
      summary: Microsoft Graph Get entities from domainDnsRecords
      operationId: domainDnsRecords.domainDnsRecord.ListDomainDnsRecord
      parameters:
        - $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.domainDnsRecordCollectionResponse
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-pageable:
        nextLinkName: '@odata.nextLink'
        operationName: listMore
      x-ms-docs-operation-type: operation
    post:
      tags:
        - domainDnsRecords.domainDnsRecord
      summary: Microsoft Graph Add new entity to domainDnsRecords
      operationId: domainDnsRecords.domainDnsRecord.CreateDomainDnsRecord
      requestBody:
        description: New entity
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.domainDnsRecord'
        required: true
      responses:
        2XX:
          description: Created entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.domainDnsRecord'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
  /domainDnsRecords/{domainDnsRecord-id}:
    description: Provides operations to manage the collection of domainDnsRecord entities.
    get:
      tags:
        - domainDnsRecords.domainDnsRecord
      summary: Microsoft Graph Get entity from domainDnsRecords by key
      operationId: domainDnsRecords.domainDnsRecord.GetDomainDnsRecord
      parameters:
        - 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 entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.domainDnsRecord'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    patch:
      tags:
        - domainDnsRecords.domainDnsRecord
      summary: Microsoft Graph Update entity in domainDnsRecords
      operationId: domainDnsRecords.domainDnsRecord.UpdateDomainDnsRecord
      requestBody:
        description: New property values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/microsoft.graph.domainDnsRecord'
        required: true
      responses:
        2XX:
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/microsoft.graph.domainDnsRecord'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    delete:
      tags:
        - domainDnsRecords.domainDnsRecord
      summary: Microsoft Graph Delete entity from domainDnsRecords
      operationId: domainDnsRecords.domainDnsRecord.DeleteDomainDnsRecord
      parameters:
        - name: If-Match
          in: header
          description: ETag
          schema:
            type: string
      responses:
        '204':
          description: Success
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
      x-ms-docs-operation-type: operation
    parameters:
      - name: domainDnsRecord-id
        in: path
        description: The unique identifier of domainDnsRecord
        required: true
        schema:
          type: string
        x-ms-docs-key-type: domainDnsRecord
  /domainDnsRecords/$count:
    description: Provides operations to count the resources in the collection.
    get:
      tags:
        - domainDnsRecords.domainDnsRecord
      summary: Microsoft Graph Get the number of the resource
      operationId: domainDnsRecords.GetCount-96e3
      parameters:
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/filter'
      responses:
        2XX:
          $ref: '#/components/responses/ODataCountResponse'
        4XX:
          $ref: '#/components/responses/error'
        5XX:
          $ref: '#/components/responses/error'
components:
  schemas:
    microsoft.graph.domainDnsRecord:
      allOf:
        - $ref: '#/components/schemas/microsoft.graph.entity'
        - title: domainDnsRecord
          required:
            - '@odata.type'
          type: object
          properties:
            isOptional:
              type: boolean
              description: >-
                If false, the customer must configure this record at the DNS
                host for Microsoft Online Services to operate correctly with the
                domain.
            label:
              type: string
              description: >-
                Value used when configuring the name of the DNS record at the
                DNS host.
            recordType:
              type: string
              description: >-
                Indicates what type of DNS record this entity represents. The
                value can be CName, Mx, Srv, or Txt.
              nullable: true
            supportedService:
              type: string
              description: >-
                Microsoft Online Service or feature that has a dependency on
                this DNS record. Can be one of the following values: null,
                Email, Sharepoint, EmailInternalRelayOnly,
                OfficeCommunicationsOnline, SharePointDefaultDomain,
                FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer,
                Intune.
            ttl:
              maximum: 2147483647
              minimum: -2147483648
              type: number
              description: >-
                Value to use when configuring the time-to-live (ttl) property of
                the DNS record at the DNS host. Not nullable.
              format: int32
            '@odata.type':
              type: string
          discriminator:
            propertyName: '@odata.type'
            mapping:
              '#microsoft.graph.domainDnsCnameRecord': '#/components/schemas/microsoft.graph.domainDnsCnameRecord'
              '#microsoft.graph.domainDnsMxRecord': '#/components/schemas/microsoft.graph.domainDnsMxRecord'
              '#microsoft.graph.domainDnsSrvRecord': '#/components/schemas/microsoft.graph.domainDnsSrvRecord'
              '#microsoft.graph.domainDnsTxtRecord': '#/components/schemas/microsoft.graph.domainDnsTxtRecord'
              '#microsoft.graph.domainDnsUnavailableRecord': '#/components/schemas/microsoft.graph.domainDnsUnavailableRecord'
  parameters:
    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
    search:
      name: $search
      in: query
      description: Search items by search phrases
      style: form
      explode: false
      schema:
        type: string
    filter:
      name: $filter
      in: query
      description: Filter items by property values
      style: form
      explode: false
      schema:
        type: string
    count:
      name: $count
      in: query
      description: Include count of items
      style: form
      explode: false
      schema:
        type: boolean
  examples: {}
  responses:
    error:
      description: error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/microsoft.graph.ODataErrors.ODataError'
    ODataCountResponse:
      description: The count of the resource
      content:
        text/plain:
          schema:
            $ref: '#/components/schemas/ODataCountResponse'
tags:
  - name: domainDnsRecords.domainDnsRecord