Skip to content

Configuring Azure Active Directory to Trust WSO2 Identity Server

This section provides instructions on how to configure the Azure Active Directory to trust the on-premise IdP (the WSO2 Identity Server) as the first part of the process of configuring WS-Federation with Office 365.


Configuring Azure AD

  1. Start the Windows Azure Active Directory Powershell.

  2. The following commands connect with Windows Azure AD Powershell.

    1. This command prompts user credentials.

      Run $cred=Get-Credential


      This will prompt for Windows Azure AD Admin credentials for the Office365 domain. The admin user’s domain credentials are usually in the following format:

    2. This command connects with the stored credentials. Provided that the credentials are accurate, the connection will be successful.

      Connect-MsolService -Credential $cred
    3. This command verifies the availability of the validated domain. This will return the Status and Authentication. The ‘Status’ of our domain should be ‘Verified’, and ‘Authentication’ should be ‘Managed’.

  3. Configure the domain as a federated domain, providing respective federation settings that match the IdP. Store the following federation settings in parameters. Replace the values below with your own.

    • Store your domain

      $dom = ""
      $brandname = "wso2"
    • Set the Issuer Id of the IdP. This value should be the same as the Identity Provider Entity Id in the Resident IDP of WSO2 Identity server.

      $issuerUri = ""
    • Set the Passive STS Endpoint URL of the IdP. This should be the Passive STS endpoint of the WSO2 Identity server.

      $passiveLogonUri = ""


      If you will be configuring Office365 Active STS clients (complying with the WS-Trust protocol) through WSO2 Identity Server as well, you can do the following configuration along with these configurations.

      Set the Active STS Endpoint URL of the IdP. This should be the Security Token Service endpoint of the WSO2 Identity server. Note that this endpoint is specific to WS-Trust and will not be used for the Passive STS use case.

    • Set the MetaData Exchange endpoint URL of the IdP.

       $mex = ""
    • Store the IdP Certificate. Base64 encoded signing certificate of WSO2 IS should be given here. For default keystore configured in WSO2 IS certificate is as below.


      The certificate should be given in a single line without a break.

  4. Run the following command to establish the trust.

    Set-MsolDomainAuthentication -DomainName $dom -Authentication Federated -ActiveLogOnUri $activeLogonUri -IssuerUri $issuerUri -SigningCertificate $cert -LogOffUri $passiveLogonUri -FederationBrandName $brandname -MetadataExchangeUri $mex -PassiveLogOnUri $passiveLogonUri -PreferredAuthenticationProtocol WsFed
  5. Run the following command to verify the federation settings

    Get-MsolDomainFederationSettings -Domain $domain


You have now successfully configured the Azure Active Directory to trust our on-premises IdP (WSO2 Identity Server). For the next part of the process of configuring WS-Federation with Office 365, see Configuring Office 365 WS-Federation with Identity Server.