In order to setup a domain to work with O365 it is necessary to add some specific DNS records to the DNS server for the domain in question. Microsoft provide a useful article which give details of the information needed – see the following article.
This article provides useful information about how to add teh records where the DNS host/service does not provide all the fields needed. This was the case when I setup the Kemnay Parish Church DNS to work with its O365 Tenancy. The DNS Domain being use for this setup is KemnayParish.church which you will see reflected in the various DNS records.
See following screen shots which who the complete setup
and the following for the MX record setup which is necessary to allow email for the domain to be routed to the O365 tenancy.