If you are thinking about Office 365, you can get a full trial from Microsoft using their E3 (or Enterprise 3) subscription. Search Google for a trial and you can sign up for 30 days.
When you get to the stage of registering you will at first be configured to use an .onmicrosoft.com domain name, so you first must configure a Global Administrator account.
Once your tenant has been provisioned click on the Option tile and click Admin.
The first stage is to get your full qualified domain name configured to operate with your Office 365 tenant, to do this click on Domain and then click Add Domain.
You will be prompted by a wizard to help walk you through configuring DNS to ensure you own the FQDN you entered in the last stage, click on Let's Get Started.
Enter the domain name you intend to use and click Next.
One of the ways you can confirm you own the domain is by configuring a TXT Record on your public DNS, Office 365 generates a TXT Value for you to do this.
Open up your DNS registra's Manage your DNS console and create a new TXT Record with the values listed from your Office 365 tenant. My DNS is managed by 123Reg so you can see how I did it for them.
Click Confirm and if you have done it correctly, Microsoft should be able to confirm you own the domain and you will receive the following screen, click on Next.
The next step is to configure your Office 365 users with a valid e-mail address at your new fully qualified domain, as the original tenant only has a single user ensure the account is ticked and click Update Selected Users.
It should be done without hitch, you will then be prompted to logout and then in with your new username at your FQDN. This means your .onmicrosoft.com domain suffix is no longer used for login to the Office 365 admin console.
Login with the new user account.
You will be prompted with another wizard to configure your DNS so that all of the Office 365 services operate properly. Click Next.
I personally host my DNS using 123Reg so I have chosen to select No, I have an existing website or prefer to manage my own DNS records and click Next. You can of course configure Microsoft to host your DNS globally.
For this example I am going to configure Office 365 with all the services available within the E3 subscription. Click Next.
You must then return to your domains DNS control panel and configure the following records with the values set for your Office 365 tenant.
Once you have done that click on Okay, I've added the records.
The tenant is now setup with your FQDN and should be operational with basic features. This was an introductory post before I document the setup of DirSync and AD FS for single sign on with Office 365 and Active Directory.