SharePoint serendipity is the effect by which one accidentally discovers something fortunate, especially while looking for something else entirely. In this case, it is the occassional musings, observations, and Ouija board readings about the phabulously

Using Azure Active Directory for Single Sign On with Yammer

Using Azure Active Directory for Single Sign On with Yammer

  • Comments 29
  • Likes

This is a pretty interesting topic that I think is going to be gaining momentum moving forward.  As many of you know, when you create a new o365 tenant you automatically get an Azure Active Directory (AAD) instance provisioned for you at the same time.  For those of you who have purchased an Enterprise o365 tenant, you now also receive a Yammer network with it (NOTE:  I'm not a licensing guy, I can't answer licensing questions, and there are different flavors of tenants and licenses that I can't and won't ever be able to explain).  If you're familiar with Yammer, you also know that today it also has its own user directory.  We typically will set up directory synchronization from an on premises Active Directory to Yammer to keep the directory up to date.  For authentication though, if you want single sign on we usually suggest using ADFS if you're a Windows shop.  Going forward though, Azure Active Directory is another alternative you can use.

The main reasons why you would want to use AAD instead of ADFS is one of time and money.  If you use ADFS, then you are responsible for building out a highly-available ADFS infrastructure.  That will mean 2 or more servers of any number of things:  ADFS, ADFS proxy, reverse proxy, firewall, and/or load balancer.  That can really add up when you think about the number of servers involved, the cost to acquire OS licenses, and the cost to patch, maintain and operate them.  On the other hand, AAD takes care of all of that infrastructure for you, and is included with any o365 tenant.  It's free up to about 500k users I think (again - I'm not a licensing guy so check if you are concerned).  You can also just create an AAD instance with a regular Azure subscription.

So if you are convinced of the goodness of AAD for this purpose, the good news is getting it set up is relatively straight-forward.  The steps you will want to do are:

  1. Add your on premise domain to your o365 subscription.
    1. Go to the o365 Admin pages and click on Domains

    2. Click on Add a Domain

    3. Follow the wizard to add your on premises domain to your o365 tenant

  2. Set up directory synchronization between your on premises Active Directory and o365

    1. Go to the o365 admin pages and click on Users and Groups, then AD synchronization set up

    2. Install AAD module for PowerShell

    3. Activate synchronization in tenant

    4. Install the dirsync tool and run

    5. After dirsync is completed, make at least one on premise user a Global Admin in o365

  3. Run the following PowerShell script using the AAD PS module:

Import-Module MSOnlineExtended -Force
$replyUrl = New-MsolServicePrincipalAddresses –Address ""
New-MsolServicePrincipal –ServicePrincipalNames @("yammer/sso") -DisplayName "Yammer Federation" -Addresses $replyUrl

You should see output afterwards that looks like this:

  4.  Capture the AppPrincipalID from the output and provide that along with your domain name (i.e. to Yammer support, along with the rest of the documentation they request with the SSO checklist they have at

You should be good to go at that point, and can do all of your authentication completely in the cloud using AAD.

  • If I want to set up an Azure account with AAD and use that AAD with Yammer, do I need to set it up first or can I add Azure later and leverage the AAD I set up with O365?

  • Steve, this still requires both DirSync and Yammer Sync, correct?

  • Yes, this requires both dirsync and yammer dir sync because they are two different directories at this time.

  • Is there anyway that you could post the instructions for configuring federation with Salesforce manually? I would like to configure it myself so that we could support the multiple SF orgs that we have.

  • Sorry @Joshua, I haven't done federation to Salesforce (yet) so I don't have anything to share.

  • So, if I also wanted SSO for all my Office365 services (Exchange, SharePoint Online, Lync), does the AAD support all of those as well, so I can effectively eliminate my ADFS 2.0 infrastructure? What are the PowerShell commands to get Office365 to use AAD instead of the typical commands for ADFS 2.0? This requires the password synchronization in the DirSync tool, correct? And one other question, with AAD and DirSync, if I disable an account in on-premises AD, I have to wait for a sync to occur before that account is unable to login to a service using AAD for authentication, correct? Rather than an immediate rejection if I was using ADFS.

  • Great post - thanks. You say "You should see output afterwards that looks like this:" but then I don't see the output. Is that my browser, or did you forget it? Also, you say in answer here that "this requires both dirsync and yammer dir sync because they are two different directories". Do you have a post about setting up Yammer Dir Sync? And just out of interest, could you live without it as long as you are prepared to invite users manually - or is that just absurd?

  • Hi @Hugh, I didn't forget the picture, this lousy blogging implementation now frequently just blocks the pictures that I *painstakingly* add to these posts (that's not an exaggeration, it's unreal how much work it is in 2014 to add pictures to a freakin' blog post). Also, I do not have a blog post about setting up Yammer Dirsync, although I suppose I could work on one when I get some spare time. It's really not bad, there is documentation on the Yammer site how to do this and a wizard to help you set it up. In theory you could go without, but I would not (i.e. it would likely be much more fruitful to work past any blocking issues you may have with Yammer dirsync rather than trying to manually sync these directories). You would, at a minimum, still want to make sure you are syncing to Azure AD for example so you can use SAML authentication.

  • Great post! Is it really a requirement to have Dirsync for Office and Yammer enabled? I would like SSO between O365 and Yammer with AAD/ADFS using AAD Users. And if this is not possible, can you explain why this would not work? Thanks in advance!

  • I guess we need a paid Azure Tenant for using this functionality in an enterprise.

  • I'm curious - would it be possible to configure Yammer with SSO directly to AAD as shown here but without the on-premise DirSync for Yammer or AAD? It would be great if Yammer could share the credentials used for Office 365 (not on-prem). In my scenario I'm unable to configure AAD DirSync, but Yammer DirSync might be possible. Thank you!

  • Hi, I'm trying to follow the above instructions but seem to be caught in a loop with Yammer support as they're asking for a metadata file which can be obtained from a URL, do you have any tips as to where I can find this URL? Cheers

  • @CJ-UK, The Azure AD metadata can be download from this URL -

    Hope that helps?

  • OK, looks like technet stripped the URL, let's see if this one works -

  • Isnt this now built in to the service.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment