0
votes

How does one get a domain into a healthy state using the Microsoft Graph Api?

Domains that are created and verified using the Graph Api always show with an exclamation mark and "Incomplete Setup" in the Office 365 management portal.

The steps performed by the GraphApi are as follows:

  1. Create a domain using the graph api in tenancy. POST /domains
  2. Get the domain txt records from graph api. GET /domains/{domainName}/verificationDnsRecords
  3. Add TXT records to DNS zone on Cpanel (external)
  4. Verify domain using Graph Api. POST /domains/{domainName}/verify
  5. Set Services. PATCH /domains/{domainName}

However after performing all the above steps the domain still shows as in an incomplete state. The only way to get it to Healthy state is by using the portal.

Including step 5 or leaving it out doesn't make a difference at all.

How does one get a domain into a Healthy state using the Graph Api?

Office 365 Management Portal

1
If my answer is helpful for you, you can accept it as answer( click on the check mark beside the answer to toggle it from greyed out to filled in.). See meta.stackexchange.com/questions/5234/…. This can be beneficial to other community members. Thank you.Allen Wu

1 Answers

1
votes

I'm afraid that it's not supported to get a domain into a Healthy state using Microsoft Graph API.

As you know, we cannot update DNS settings via Microsoft Graph API.

Although we can verify the domain, but the domain status which is visible in portal is not exposed in Microsoft Graph domain properties.

And the O365 admin portal is calling another kind of API: https://admin.microsoft.com/admin/api/Domains which is not exposed to update the domain data.