...
Prerequisites
- Configure Azure Active Directory (AD) to trust WSO2 Identity Server. For more information on how to do this, see Configuring Azure Active Directory toTrust WSO2 Identity Server .
- Configure an Active Directory user store as the primary user store in WSO2 Identity Server. For more information on how to do this, see Configuring an Active Directory User Store.
- Configure WSO2 Identity Server to authenticate users using the email address as the username. For more information on how to do this, see Using Email Address as the Username.
Configuring Office 365 WS-Trust
Start the WSO2 Identity Server and log in to the management console
Click Resident under Identity Providers in the Main menu. Expand the Inbound Authentication Configuration section and then the WS-Federation(Passive) Configuration.
Replace the value of the Identity Provider Entity Id with the value given for the parameter $issueruri when configuring Azure AD (configured in step 3 of this topic) , and click Update to save changes.
In this sample scenario, the value for the Identity Provider Entity Id is https://wso2test.com.Navigate to Claims>Add in the Main menu and click Add New Claim. Set 'User Principle' and 'ImmutableID' as claims as seen below. See Adding Claim Mapping for more information.
Navigate to Claims>List and click on the http://wso2.org/claims claim dialect. Click on Edit for each of the claims below and untick the Supported by Default checkbox.
Info title Why do these claims need to be edited? These attributes are not supported by Active Directory by default. Therefore if these attributes are ticked as Supported by Default in Identity Server, they will be shown in the default user profile and you will recieve an error once you try to update the user profile.
Country - http://wso2.org/claims/country
- Organization - http://wso2.org/claims/organization
- IM - http://wso2.org/claims/im
Navigate to Service Providers > Add in the Main menu and add a new Service Provider named ' Office365'.
Expand the Inbound Authentication Configuration section, then the WS-Trust Security Token Service Configuration and click Configure.
Enter the following details in the form that appears and click Apply. See Configuring WS-Trust STSSecurity Token Service for more information about these fields.
Endpoint Address: urn:federation:MicrosoftOnline
Certificate Alias: wso2carbon
Expand the Claim Configuration section and configure the following attributes required by Azure AD as seen below.
Service Provider Claim Local Claim Requested Claim Ticked (True)
http://schemas.microsoft.com/ws/2008/06/identity/claims/role
Ticked (True)
http://schemas.microsoft.com/LiveID/Federation/2008/05/ImmutableID
http://wso2.org/claims/objectguid Ticked (True) Set the Subject Claim URI to the Immutable ID claim and the Role Claim URI to the role claim. Click Update to save changes to the service provider.
Navigate to Identity Providers>List Click Resident under Identity Providers in the Main menu and click Resident Identity Provider. Expand the Inbound Authentication Configuration section, then the Security Token Service Configuration section and click Apply Security Policy.
Select Y es in the Enable Security dropdown.
Select UsernameToken under Basic Scenarios and click Next .
Select the Admin role checkbox from the User Groups and click Finish .
Note Note: It is not mandatory to select the ‘admin’ role for authentication of the UserNameToken. Any role having ‘login’ permissions would be sufficient.
Click Update to save all changes.
Create a user and update the user's profile with a User Principle Name as seen below.
Note ObjectGUID is a binary attribute. Add the following user store property to the
<IS_HOME>/repository/conf/user-mgt.xml
file under the relevant user store tag in order to see the value properly in the management console.Code Block <UserStoreManager ... > ... <Property name="java.naming.ldap.attributes.binary">objectGUID</Property> ... </UserStoreManager>
...