2023-05-17 16:38:24 +02:00
---
name: M365_BUILDER
parameters:
- label
- mx
- autodiscover
- dkim
- skypeForBusiness
- mdm
- domainGUID
- initialDomain
parameters_object: true
parameter_types:
label: string?
mx: boolean?
autodiscover: boolean?
dkim: boolean?
skypeForBusiness: boolean?
mdm: boolean?
domainGUID: string?
initialDomain: string?
---
DNSControl offers a `M365_BUILDER` which can be used to simply set up Microsoft 365 for a domain in an opinionated way.
It defaults to a setup without support for legacy Skype for Business applications.
It doesn't set up SPF or DMARC. See [`SPF_BUILDER` ](/language-reference/record-modifiers/dmarc_builder ) and [`DMARC_BUILDER` ](/language-reference/record-modifiers/spf_builder ).
## Example
### Simple example
{% code title="dnsconfig.js" %}
```javascript
M365_BUILDER({
2023-05-24 22:09:22 +02:00
initialDomain: "example.onmicrosoft.com",
2023-05-17 16:38:24 +02:00
});
```
{% endcode %}
This sets up `MX` records, Autodiscover, and DKIM.
### Advanced example
{% code title="dnsconfig.js" %}
```javascript
M365_BUILDER({
2023-05-24 22:09:22 +02:00
label: "test",
2023-05-17 16:38:24 +02:00
mx: false,
autodiscover: false,
dkim: false,
mdm: true,
2023-05-24 22:09:22 +02:00
domainGUID: "test-example-com", // Can be automatically derived in this case, if example.com is the context.
initialDomain: "example.onmicrosoft.com",
2023-05-17 16:38:24 +02:00
});
```
{% endcode %}
This sets up Mobile Device Management only.
### Parameters
2023-05-24 22:09:22 +02:00
* `label` The label of the Microsoft 365 domain, useful if it is a subdomain (default: `"@"` )
2023-05-17 16:38:24 +02:00
* `mx` Set an `MX` record? (default: `true` )
* `autodiscover` Set Autodiscover `CNAME` record? (default: `true` )
* `dkim` Set DKIM `CNAME` records? (default: `true` )
* `skypeForBusiness` Set Skype for Business/Microsoft Teams records? (default: `false` )
* `mdm` Set Mobile Device Management records? (default: `false` )
* `domainGUID` The GUID of _this_ Microsoft 365 domain (default: `<label>.<context>` with `.` replaced by `-` , no default if domain contains dashes)
* `initialDomain` The initial domain of your Microsoft 365 tenant/account, ends in `onmicrosoft.com`