> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.ex2.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How to configure Office 365 in cPanel?

# Steps to set up Office 365 in cPanel

1. First, retrieve less registration of your Microsoft 365 accounts via this [link](https://learn.microsoft.com/en-en/microsoft-365/admin/get-help-with-domains/information-for-dns-records?view=o365-worldwide).

2. [Log in to your cPanel control panel](https://help.ex2.com/en/article/how-to-log-in-to-my-cpanel-account-xyoqm0/?bust=1676568558370).

3. Click Zone Editor in the Domains section of [cPanel](https://help.ex2.com/en/article/what-is-cpanel-vq3toz/?bust=1784206091492).

![](https://storage.crisp.chat/users/helpdesk/website/52421894134f0400/cpanelzoneeditor_1nnzzgv.jpg)

4. Click Manage next to the domain name. To add a new directory, select the directory type from the drop-down menu and enter the folder name, TTL and destination.

![](https://storage.crisp.chat/users/helpdesk/website/52421894134f0400/cpanelzoneeditor2_1grq5ew.jpg)

5. Configure DNS for Office 365.

###### To configure Microsoft Office 365, update DNS records as follows:



1. Add a TXT entry as explained in #1 of 


NOMDEDOMAINE.COM.  3600 TXT MS=ms*******       

* Important: The exact value is provided on your Office365 panel

2. Change the existing TXT/SPF entry. Add include:spf.protection.outlook.com to the existing entry. 

Before:    

NOMDEDOMAINE.COM.  14400 TXT  "v=spf1 +a +mx +ip4:135.125.104.65 ~all"

After: 

Example:  NOMDEDOMAINE.COM.  14400 TXT  "v=spf1 +a +mx +ip4:135.125.104.65 include:spf.protection.outlook.com ~all"

###### Edit MX entry: 

NOMDEDOMAINE.COM.  300 MX 0 NOMDEDOMAINE.COM.mail.protection.outlook.com.   *Important, you must validate the MX entry with the O365 panel

Delete the DNS entry of type A record named: Autodiscover

###### Add the following DNS entries 
```
autodiscover 3600 CNAME autodiscover.outlook.com.
sip 3600 CNAME sipdir.online.lync.com.
lyncdiscover 3600 CNAME webdir.online.lync.com.
msoid 3600 CNAME clientconfig.microsoftonline-p.net.
enterpriseregistration 3600 CNAME enterpriseregistration.windows.net.
enterpriseenrollment 3600 CNAME enterpriseenrollment.manage.microsoft.com.
```


###### Add the following SRV entries:
```
_sip. _tls 3600 SRV 100 1 443 sipdir.online.lync.com.
_sipfederationtls. _tcp 3600 SRV 100 1 5061 sipfed.online.lync.com. 6. Change remote email routing6. Change remote email routing
```


After editing the DNS records, go to the Routing of cPanel emails section.

![](https://storage.crisp.chat/users/helpdesk/website/52421894134f0400/cpanelemailrerouting_178aksf.jpg)

Select your domain from the drop-down menu, set your routing to “Remote Mail Server” and click “Edit”.

![](https://storage.crisp.chat/users/helpdesk/website/52421894134f0400/cpanelemailrouting2_1k2b5qj.jpg)

Congratulations! You’ve added Office 365 directories. In general, it takes about 15 minutes for these changes to be active and functional. As it must propagate through the DNS system, the process can take up to a few hours. 