Determine if an email address is hosted on O365

Time and again we do come across many email ID's . With cloud becoming a de facto of IT services offered increasingly organizations are trying to offload their mail service to vendors.

Office 365 from Microsoft has emerged as a leader in providing email as a service. To determine if an organization is hosting their mail services on O365 we can use an API call as below:-

https://login.microsoftonline.com/getuserrealm.srf?login=username@acmecomputercompany.com&xml=1

The output would be an xml as below




If the "NameSpaceType" indicates "managed" then the organization is using O365 for their email services.
Other values are "federated" for "Federated active directory"

Easy isnt it! So go out there and try it out. Post your comments if you find any issues and I will look into it!

Comments

Popular posts from this blog

python3: unpickling error

Azure Data Analytics: Part1: Hosting Data Lake storage: Gen1 and Gen2