Gallery
API Documentation
Share
Explore
API Reference

icon picker
Microsoft Domain Setup

To add domains and create mailboxes in Microsoft Office 365, you need to create a Microsoft Office 365 admin account. This process is quite simple, and you can follow this setup guide for assistance.
Once you have completed the admin account setup, you will need to perform app registrations. This step allows Lily to connect with your account and obtain the necessary permissions.

pasted image 0.png


To add domains and create users in Microsoft, you require the following credentials in addition to Cloudflare ones:
Client ID
Tenant ID
Client Secret
Each of these credentials is unique to every admin account. Therefore, if you intend to utilize multiple accounts to create mailboxes in Outlook, you will need these credentials for each admin account.
Now, let's explore how you can obtain these credentials:

To create the "Client ID, Tenant ID, and Client Secret" in Microsoft 365, follow these steps:

Begin by signing in to your admin account at admin.microsoft.com.
Next, log in to portal.azure.com.
pasted image 0.png
First, search for "App Registrations" at the top search bar.
pasted image 0.png
Next, click on it. When you do this, you will find a panel similar to this:
pasted image 0.png
Click on the "+ New registration" link just below the title "App registrations."
pasted image 0.png
Upon doing that, a window similar to this will open.
pasted image 0.png
Enter the name "Automation."
pasted image 0.png
Keep the supported account types the same.
pasted image 0.png
Select "Web" as the Redirect URL from the dropdown menu.
pasted image 0.png
After that, mention this URL: "https://www.integromat.com/oauth/cb/app."
pasted image 0.png
Then simply click the "Register" button at the bottom.
Afterwards, it will generate the "Client ID and Tenant ID."
pasted image 0.png
Copy these "Client ID and Tenant ID" and save them somewhere else.
Next, you need to create a Client secret. To do that, click on the "Add a certificate or secret" link.
pasted image 0.png
pasted image 0.png
Then click on "+ New Client Secret," which will open a window similar to the screenshot below.
Now, type "Credentials" in the description field and select a duration of 12 months from the dropdown box.
pasted image 0.png
Click the "Add" button at the bottom. Your client secret ID is now created.
pasted image 0.png
Copy the "Value" as highlighted, not the Secret ID, and save it along with the Client ID and Tenant ID.
Copy this secret value immediately, as it will be hidden after a certain time.
You have now created all three credentials. Now, you need to assign a few API permissions. To do that, click on the "API Permissions" link in the sidebar, which will open a page similar to the one shown below.
pasted image 0.png
Click on "Microsoft Graph" marked by the pointer, and then click on "Application permissions" as shown in the given screenshot.
pasted image 0.png
Next, search for "USER."
pasted image 0.png
Scroll down and select all six options under the "USER" dropdown, then hit "Update permissions."
pasted image 0.png
Once again, click on "Microsoft Graph" marked by the pointer, and then click on "Application permissions" as shown in the below screenshot.
pasted image 0.png
Search for "DOMAIN" and select both options, then click the "Update permissions" button at the bottom.
pasted image 0.png
Once again, click on "Microsoft Graph" marked by the pointer, and then click on "Application permissions" as shown in the selected screenshot. This time, search for "License" and select the available option, then hit the "Update permissions" button at the bottom.
pasted image 0.png
Once all ten permissions are added, click on "Grant admin consent for ___."
pasted image 0.png
After doing that, all the permissions will be assigned, and the status will change from "Not granted for ___" to "Granted for ___."
pasted image 0.png
Now you are ready to use all three credentials in the automation to add domains and create users in Microsoft.

Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.