> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neoagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# M365 User Onboarding

> Create a new user in Microsoft 365 from an onboarding ticket, with groups, a license, a PSA contact and a secure password link

The agent works one onboarding ticket from start to finish. It checks that the person who asked may request a new user, reads your onboarding SOP, and creates the user in Entra ID. Then it adds the user to groups, assigns a license, creates the PSA contact and sends the password to the requester through a secure link. Each change in Microsoft 365 waits for a technician to approve it.

This page covers clients whose users are created directly in Entra ID. For a client that creates users in on-prem Active Directory and syncs them to Microsoft 365, set up the same template with [Hybrid AD User Onboarding](https://docs.neoagent.io/recipes/hybrid-ad-user-onboarding.md). The reverse process is [M365 User Offboarding](https://docs.neoagent.io/recipes/m365-user-offboarding.md).

The template works with Autotask, ConnectWise, Halo and Syncro.

## What the agent does

The steps come from the template's **Custom Instructions**. Each change uses a permission group or tool on the **Tools & Settings** tab.

| Step | What the agent does | Permission group or tool |
| - | - | - |
| 1 | Checks that the requester has an Admin, HR, Director, VIP, Payroll Coordinator or C-level title or type, or is one of your technicians. It continues only for an authorized requester. Otherwise the instructions tell it to ask Admins and HR to confirm. | **Find PSA Contacts** |
| 2 | Searches your documentation for "New User" and follows that SOP | **Find Documentation** |
| 3 | Creates the user in Entra ID | Microsoft 365 **User Management** |
| 4 | Adds the user to the groups the ticket or the SOP names | Microsoft 365 **Groups** |
| 5 | Assigns a Microsoft license, and buys a seat on your marketplace when none is free | Microsoft 365 **Licensing**, **List License Subscriptions**, **Change License Seats** |
| 6 | Creates the new user as a PSA contact | PSA **Contacts** |
| 7 | Adds the new user's full name to the ticket title | PSA **Tickets** |
| 8 | Replies to the ticket's contact with the password behind a secure link | **Generate Password**, **Generate Secure Link**, PSA client-facing notes |
| 9 | Adds an internal note for the audit trail | PSA internal notes |

The secure link expires and allows only a few views, so the password does not stay in the ticket or in an email ([Generate Secure Link](https://docs.neoagent.io/agents/tools/management/generate-secure-link.md)).

## Set it up

**1. Connect the client's tenant and set it to Entra ID**

Neo works only in a Microsoft 365 tenant it is connected to. Connect each client with [GDAP](https://docs.neoagent.io/integrations/m365/gdap.md) or [direct consent](https://docs.neoagent.io/integrations/m365/cloud.md).

Then tell Neo where the client's users live. Open [**Companies**](https://dashboard.neoagent.io/end-companies), click the **Edit** button on the client's row, set **Employee Identity Provider** to **Entra ID (Cloud)** and click **Save**. While it is **None**, the agent asks a technician which environment the company uses before it creates a user. If all your clients with no identity provider are cloud-only, set **Companies with no identity provider** at the top of the Companies page to **Run as Entra ID (Cloud)** instead ([details](https://docs.neoagent.io/integrations/m365/intro.md#companies-with-no-identity-provider)).

![Edit Company dialog with the Employee Identity Provider list open: None, Entra ID (Cloud), On-prem AD, Hybrid, Hybrid (no AD Connect sync)](https://mintcdn.com/neoagent/547DCVFt2IUm1Lrw/images/recipes/m365-identity-provider.webp?fit=max\&auto=format\&n=547DCVFt2IUm1Lrw\&q=85\&s=5cadc9c12706e83dd4a3b4a088897e34)

**2. Start from the template**

Open the [**M365 User Onboarding** template](https://dashboard.neoagent.io/agents/create?templateId=46). On **Triggers & Filters**, **Trigger When** is **Manual Only**: the agent runs only when a technician starts it on a ticket. **Show in PSA Pod** is on, so technicians can start it from the ticket if your PSA has the [Neo panel](https://docs.neoagent.io/integrations/psa/neo-panel/setup.md#choose-the-agents-in-the-panel).

To start it on every onboarding ticket, see [Start automatically on onboarding tickets](#start-automatically-on-onboarding-tickets).

**3. Choose who approves**

On **Tools & Settings**, under **Approvals**, open **Request Technician-in-the-Loop Approval**. The template ships with no approvers, and Neo does not save the agent until it has one. Pick people under **Technicians-in-the-loop who can approve actions**, or a channel under **Teams or Slack channels & chats that can approve**. Each approver needs the Neo AI Agent app in Teams ([Technician-in-the-Loop](https://docs.neoagent.io/core/technician-in-the-loop.md)).

![Request Technician-in-the-Loop Approval settings: approval channels, Who receives approval requests and the approvers list](https://mintcdn.com/neoagent/u95ne_lKoQa74zsB/images/recipes/til-approval.webp?fit=max\&auto=format\&n=u95ne_lKoQa74zsB\&q=85\&s=a881ec7c1e12b3c7524a8be60098bdaf)

**4. Check the permissions**

On the same tab, under **Identity & Workspace**, the template sets:

* **Microsoft 365 Admin (Cloud)**: **User Management**, **Groups**, **Licensing** and **Directory Roles** at **Write** with **Approval** on, and **Domains** at **Read**.
* **Exchange (Online/Cloud and On-Prem)**: **Mailboxes** and **Mailbox Permissions** at **Write** with **Approval** on, for the mailbox settings your SOP asks for.
* **Active Directory (On-Prem)**: used only for hybrid clients. A company set to **Entra ID (Cloud)** never uses it.

With **Approval** on, Neo holds each change until a technician approves it, then makes it. Keep it on for an onboarding agent. Do not click a preset here: **IT Admin** and **Full Automation** turn approval off on most groups. No step gives the new user an admin role, so set **Directory Roles** to **Read** unless your SOP needs one.

![Microsoft 365 Admin (Cloud) permissions: Directory Roles, Groups, Licensing and User Management at Write with Approval on, Domains at Read](https://mintcdn.com/neoagent/547DCVFt2IUm1Lrw/images/recipes/m365-onboarding-permissions.webp?fit=max\&auto=format\&n=547DCVFt2IUm1Lrw\&q=85\&s=b58a7a864027277e4d405f5773b4cafe)

Under **PSA**, check that **Contacts**, **Tickets** and both note groups are at **Write**. The client-facing notes group has **Approval** on, so a technician approves the password reply before it goes out.

> [!WARNING]
>
> On Syncro, the template cannot create the contact or send the password reply as shipped, because it has no Contacts write and no client-facing notes. Set **Contacts** and **Client-Facing Notes** to **Write** under **PSA**, or delete steps 6 and 8 from the instructions and send the password yourself.

**5. Decide on license purchases**

Under **Cloud Marketplace**, **Change License Seats** ships with **Allow adding seats** on, **Allow removing seats** off and **Approval** on. When the tenant has no free license, the agent asks a technician to approve one more seat, then assigns it.

The tool needs a [license marketplace integration](https://docs.neoagent.io/integrations/marketplaces/intro.md), with the company mapped to its customer on the marketplace's Organization Mapping tab. Without one, the agent cannot buy a seat, and it reports that no license marketplace integration is configured. If a technician should buy every license, turn **Change License Seats** off ([Change License Seats](https://docs.neoagent.io/agents/tools/m365/change-license-seats.md)).

![Change License Seats with Allow adding seats on, Allow removing seats off and Approval on, above List License Subscriptions](https://mintcdn.com/neoagent/547DCVFt2IUm1Lrw/images/recipes/m365-onboarding-license-seats.webp?fit=max\&auto=format\&n=547DCVFt2IUm1Lrw\&q=85\&s=cddb8c3d22f5d8a171bc11ed48208bf4)

**6. Fit the instructions to your process**

Under **Custom Instructions**, replace the template values with yours:

* The titles and types that may request a new user (step 1).
* The documentation title "New User" (step 2). If your SOP has another title, use it. The SOP is where the agent reads your naming format, standard groups and default license, so write those in it.
* The password delivery (step 8), if you send passwords another way.

Step 1 tells the agent to message Admins and HR when the requester is not on the list, but the template has no email or Teams tool. Turn on **Send Email** under **Messaging** for that step, or change it to "add an internal note and stop".

**7. Test on a test request**

Open an onboarding ticket for a test user in a client's tenant, for example "New starter: Test Joiner, Sales", from an authorized contact.

1. On **Overview**, turn on **Test Mode** and click **Save & Enable**. Click **Run** in the agent's header, pick **Real ticket from PSA**, enter the ticket under **Ticket IDs**, and run. Neo reads your live tenant but changes nothing, and posts its plan as an internal ticket note. Exchange PowerShell does not run in Test Mode, even to read ([why](https://docs.neoagent.io/agents/tools/m365/overview.md#test-mode)).
2. Turn **Test Mode** off and run the agent on the same ticket again, with **Supervised run** on. Approve each change and check the result in the Microsoft 365 admin center and your PSA.
3. Read each run on [**Activity**](https://dashboard.neoagent.io/executions). Delete the test user and its PSA contact when you are done, and lower the seat count if the agent bought one.

Only then use the agent on a real new starter. The **Approval** switches still hold each Microsoft 365 and Exchange change.

## Variations

### Start automatically on onboarding tickets

On **Triggers & Filters**, change **Trigger When** to **Ticket Created** and add a filter for your onboarding ticket type under **Filter Tickets**. Without a filter, the agent runs on every new ticket.

### Clients with on-prem Active Directory

One agent serves cloud and hybrid clients, because each run reads the company's **Employee Identity Provider**. For a hybrid client, follow steps 1 and 2 of [Hybrid AD User Onboarding](https://docs.neoagent.io/recipes/hybrid-ad-user-onboarding.md) to set up the company and the RMM path. The agent then creates the user in Active Directory and starts an Entra Connect sync.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.