# Entra ID setup

{% hint style="info" %}
In 2023, Azure Active Directory (Azure AD) was renamed to Microsoft Entra ID. These terms refer to the same service.
{% endhint %}

If you already have an existing Microsoft 365 tenant with a verified corporate domain, you can skip this step.

## What you need

A Microsoft Entra ID tenant with a **corporate domain** — a domain you own, such as `yourcompany.com`. This is separate from the initial `.onmicrosoft.com` domain that Microsoft assigns when you create a tenant.

The corporate domain is required because Peig federation switches that domain from managed to federated authentication. The `.onmicrosoft.com` domain cannot be federated.

## Create a new tenant

If you do not have an existing tenant:

1. Visit the Microsoft Entra portal: [https://entra.microsoft.com](https://entra.microsoft.com/)
2. Click **Sign up** and follow the prompts
3. Enter your organisation name and initial domain — this will be in the format `[your-organisation].onmicrosoft.com`

## Add and verify your corporate domain

1. Log in to the Microsoft 365 Admin Center: [https://admin.microsoft.com](https://admin.microsoft.com/)
2. Navigate to **Settings → Domains**
3. Click **Add domain** and enter your corporate domain
4. Follow the verification steps — Microsoft will ask you to add a DNS record to prove ownership of the domain

Once verified, your corporate domain will appear in the domain list with a status of **Healthy**.

{% hint style="info" %}
If you are starting with a new tenant, wait until the Peig connector is configured (Step 3) before creating users. Users provisioned directly through Peig from the start do not require migration.
{% endhint %}

## Confirm your setup

Before moving to Step 2, verify:

* [ ] You have an active Microsoft Entra ID tenant
* [ ] A corporate domain (not `.onmicrosoft.com`) is added and verified
* [ ] You have Global Administrator access to the tenant


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.peig.io/welcome-to-peig-documentation/deployment-guides/microsoft-365/entra-id-setup.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
