If you are having issues with SharePoint Online and your vanity domain playing well together there could be a "simple" reason why. If you have a vanity domain ending with "sharepoint.com" like "justsharepoint.com" or "idevelopsharepoint.com" it will not work with SharePoint Online at this time.
Well that’s kind of the truth, the public or anonymous pieces work great. However the moment you try to get to a secure portion of your public site or gain access to your Team Site you will get this error page:
I spent a bit of time trying to research it and finally found an Office 365 community forum question around this:http://community.office365.com/en-us/forums/154/p/19235/91800.aspx
The response from the MSFT support team was that the vanity domain could not end with "sharepoint.com" I decided to open a support call with Microsoft since it has now almost been 7 months since that incident to see if anything has changed. After a day of research on their part it was concluded that it is still not resolved. My assumption is that it has something to do with the way that SharePoint Online writes out URLs when trying to get to the Office 365 authentication page. Another clue into this is the fact that anybody using a non-vanity domain for their public website on Office 365 get a URL like this: "YourSiteName.sharepoint.com" I would almost bet that there is something hardcoded somewhere that is keying off of this and causes the above noted error with vanity domain ending with "sharepoint.com"
As a side note, the support team mentioned that there was an Office 365 update which occurred in May, but it apparently did not correct this issue. The other thing I want to note is that this only affects SharePoint Online. Lync and Outlook still use my "idevelopsharepoint.com" vanity domain with no issues at all.
I know that this could be a serious deal breaker for most that are in this situation, but for me I still made the move and switched from my ".com" to my ".net" which is working great. I’m sure that this will get resolved over time, but until then I will still be enjoying the benefits of Office 365.