{"id":2078,"date":"2013-04-14T23:16:50","date_gmt":"2013-04-15T08:16:50","guid":{"rendered":"http:\/\/www.cloudidentity.com\/blog\/?p=2078"},"modified":"2013-04-14T23:18:46","modified_gmt":"2013-04-15T08:18:46","slug":"adding-a-custom-domain-to-your-windows-azure-ad","status":"publish","type":"post","link":"https:\/\/www.cloudidentity.com\/blog\/2013\/04\/14\/adding-a-custom-domain-to-your-windows-azure-ad\/","title":{"rendered":"Adding a Custom Domain to your Windows Azure AD"},"content":{"rendered":"<p>I recently created a new Windows Azure subscription trial, going though the <a href=\"https:\/\/www.cloudidentity.com\/blog\/2013\/03\/04\/managing-windows-azure-ad-from-the-windows-azure-portal-1-sign-up-with-an-organizational-account\/\">Organizational route<\/a>.<\/p>\n<p>However, I made a mistake: I accepted the default name assigned to the directory, which happens to be the combination of the first and last name of the admin user I created.&nbsp; Having that directory named as one user can be supremely confusing, and given that I was planning to use the new tenant for posts and samples\u2026<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb.png\" width=\"604\" height=\"479\"><\/a><\/p>\n<p>Instead of starting from scratch and create a subscription with another name, I decided to be a bit more creative: I would associate to it a custom domain, confident that I would find a suitable one among all the domains I accumulated through the years. <\/p>\n<p>The domain verification process is <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/jj151788.aspx\">well documented<\/a>, however I am a sucker for screenshots and MSDN is traditionally not crazy about it (they *SO* didn\u2019t like the draft of walkthrough <a href=\"https:\/\/www.cloudidentity.com\/blog\/2013\/04\/08\/walkthrough-1-adding-sign-on-to-your-web-application-using-windows-azure-ad\/\">#1<\/a> and <a href=\"https:\/\/www.cloudidentity.com\/blog\/2013\/04\/09\/walkthrough-3-developing-multi-tenant-web-applications-with-windows-azure-ad\/\">#3<\/a> when they first saw them <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Smile\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/wlEmoticon-smile4.png\">) hence I decided to snap few pics while I was going though the process, in case there\u2019s more people with a thick visual cortex out there that could benefit from it.<\/p>\n<p>First thing to do: head to the active directory tab, then click on the directory entry (here called \u201cvittorio.bertocci\u201d. I know, I know\u2026).<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image1.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb1.png\" width=\"604\" height=\"224\"><\/a><\/p>\n<p>Click on the Domains header.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image2.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb2.png\" width=\"604\" height=\"217\"><\/a><\/p>\n<p>I just created the tenant, hence the custom domains list is as white as the carpet of fallen petals tapestrying Redmond in these Spring days. Click on the \u201cAdd a custom domain\u201d button.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image3.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb3.png\" width=\"604\" height=\"504\"><\/a><\/p>\n<p>Here you can specify the domain you want to use. I picked cloudidentity.net mostly because I keep it on GoDaddy, which happens to be one of the most popular providers out there. <br \/>Note: here I am happily ignoring the instructions on setting up SSO, given that for the time being I have no intention of setting up an ADFS2.0 instance for this (though I eventually just might).<\/p>\n<p>Once typed your domain name, hit Add.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image4.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb4.png\" width=\"604\" height=\"541\"><\/a><\/p>\n<p>So far nothing of relevance happened yet. AAD now knows about your intention of using cloudidentity.net, but still has no idea (anthropomorphising much?<img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Smile\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/wlEmoticon-smile4.png\">) of if you are the rightful owner of the domain. That\u2019s the job of the next step. Click on the right arrow on the lower right corner.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image5.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb5.png\" width=\"604\" height=\"499\"><\/a><\/p>\n<p>We get to the verification page. Here the portal gives you few coordinates (BTW, if you are curious about what a TXT record is see <a href=\"https:\/\/my.bluehost.com\/cgi\/help\/txt_record\">here<\/a>) you are supposed to add to the DNS record of your domain; the idea is that only the legitimate owner of the domain has access to its records, hence if you are able to add that info and AAD finds that in place once you hit Verify, you will have proven that the domain is yours to use. If you click on the instructions link you\u2019ll get to a <a href=\"http:\/\/technet.microsoft.com\/library\/jj151803.aspx#BKMK_cname\">very helpful page<\/a> giving you step by step instructions (but no screenshots <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-smile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Smile\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/wlEmoticon-smile4.png\">).<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image6.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb6.png\" width=\"604\" height=\"506\"><\/a><\/p>\n<p>So, here I opened a new browser window and headed to godaddy.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image7.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb7.png\" width=\"604\" height=\"462\"><\/a><\/p>\n<p>After having signed in and clicked on My Account I expanded the list of domains.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image8.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb8.png\" width=\"604\" height=\"586\"><\/a><\/p>\n<p>Once located the entry for cloudidentity.net, I launched the editor with the Launch button on its right. Here I looked up the Domain Manager link, and clicked on it.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image9.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb9.png\" width=\"604\" height=\"739\"><\/a><\/p>\n<p>Here you can edit various DNS records: we are especially interested in TXT ones. Click on quick add.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image10.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb10.png\" width=\"604\" height=\"86\"><\/a><\/p>\n<p>Enter in Host and TXT Value the info you got in the verification dialog in the Windows Azure portal, then scroll all the way to the bottom of the page and save.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image11.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb11.png\" width=\"604\" height=\"64\"><\/a><\/p>\n<p>Your TXT record is now up! ALT+TAB your way back to the portal and hit Verify.<a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image12.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; border-left: 0px; display: inline; padding-right: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb12.png\" width=\"604\" height=\"542\"><\/a><\/p>\n<p>Ta dah! The domain is verified! Hit the OK button on the lower right.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image13.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb13.png\" width=\"604\" height=\"231\"><\/a><\/p>\n<p>The list of domains now include both the default 3-level one and the new entry for cloudidentity.net.<\/p>\n<p>Want to see if it works? Easy!<\/p>\n<p>Go to the Users section of the portal and create a new user.<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image14.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb14.png\" width=\"604\" height=\"478\"><\/a><\/p>\n<p>In the username domain dropdown you can now pick the new domain, which is pretty neat.<\/p>\n<p>Just for fun I created the user in the global admin role, then I headed to Visual Studio, created a new MVC project and launched the <a href=\"https:\/\/www.cloudidentity.com\/blog\/2013\/02\/18\/microsoft-asp-net-tools-for-windows-azure-active-directory-visual-studio-2012-4\/\">ASP.NET tool for Windows Azure AD<\/a> (yes, it still works even with <a href=\"https:\/\/www.cloudidentity.com\/blog\/2013\/04\/08\/windows-azure-active-directory-reaches-general-availability\/\">Windows Azure AD GA<\/a>, tho the tool itself is still in preview and there are interesting caveats I\u2019ll spell out in the next days).<\/p>\n<p>Here, as tenant identifier I entered the custom domain:<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image15.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb15.png\" width=\"488\" height=\"183\"><\/a><\/p>\n<p>once prompted by the AAL dialog I entered the new user\u2019s credentials on the new domain:<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image16.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb16.png\" width=\"604\" height=\"453\"><\/a><\/p>\n<p>The tool informed that the app was successfully configured and provisioned. I hit F5 and\u2026<\/p>\n<p><a href=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image17.png\"><img loading=\"lazy\" decoding=\"async\" title=\"image\" style=\"border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; margin: 0px; display: inline; padding-right: 0px; border-top-width: 0px\" border=\"0\" alt=\"image\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/image_thumb17.png\" width=\"604\" height=\"398\"><\/a><\/p>\n<p>Ta dah! From 3-level defaults to vanity domains in literally minutes. Pretty cool <img decoding=\"async\" class=\"wlEmoticon wlEmoticon-winkingsmile\" style=\"border-top-style: none; border-left-style: none; border-bottom-style: none; border-right-style: none\" alt=\"Winking smile\" src=\"https:\/\/www.cloudidentity.com\/blog\/wp-content\/uploads\/2013\/04\/wlEmoticon-winkingsmile2.png\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently created a new Windows Azure subscription trial, going though the Organizational route. However, I made a mistake: I accepted the default name assigned to the directory, which happens to be the combination of the first and last name of the admin user I created.&nbsp; Having that directory named as one user&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2049,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2078","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/2078","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/comments?post=2078"}],"version-history":[{"count":1,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/2078\/revisions"}],"predecessor-version":[{"id":2079,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/posts\/2078\/revisions\/2079"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/media\/2049"}],"wp:attachment":[{"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/media?parent=2078"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/categories?post=2078"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudidentity.com\/blog\/wp-json\/wp\/v2\/tags?post=2078"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}