SAML Single Sign-On (v1)
This documentation is outdated and included for archival purposes only, you may be looking for the latest version.
This page explains how the single sign-on using SAML feature is set up for technical users. This feature currently provides no user-accessible configuration and requires assistance from your Open Social support contact.
Note: this feature is part of the Community Management System.
Technical Background
Open Social uses the SimpleSAMLphp library which uses the SAML 2.0 protocol for Single Sign-On. Open Social acts in this set-up as a Service Provider.
Set-up
Data to be provided to Open Social
In order to configure SAML based Single Sign-On for your platform, the Open Social team requires some information. Please provide your Open Social support contact with the following information:
- The URL of the Identity Provider (IdP)
This is sometimes known as the Federation Service Identifier and for ADFS servers is in the form of <domain>/adfs/services/trust - The remote IdP metadata
This should be in XML format and can also be a URL that points to the XML download.
Data to be configured in your Identity Provider
The following information is required to configure the Identity Provider to allow Open Social to authenticate users against the SSO portal. In case of doubt, these can be provided by your Open Social service contact.
- The service provider URL will be your Open Social domain name followed by /simplesaml/.
For example, for the community talks website this would be https://communitytalks.getopensocial.com/simplesaml/ - Once the SAML integration is enabled the Service Provider metadata can be downloaded from your Open Social domain name followed by /simplesaml/module.php/saml/sp/metadata.php/drupal-sp
For example, for the community talks website this would be https://communitytalks.getopensocial.com/simplesaml/module.php/saml/sp/metadata.php/drupal-sp - The authentication source for the Service Provider (SP) is named drupal-sp
- Open Social expects the following data sent as attributes
- eduPersonPrincipalName
- This will be used to link Open Social users to users in the Identity Provider
- This will be used as username in Open Social. A username is used as fallback display name when no name has been filled in on the user's Open Social profile.
This may not be an e-mail address and must contain alphanumeric characters. Several special characters are allowed, including space, period (.), hyphen (-), apostrophe ('), and underscore (_).
- mail
- The user's email address that be used to deliver notifications to the user so it must be reachable from public mail servers.
- eduPersonPrincipalName
Post-set-up
Once the SAML integration has been enabled and configured by Open Social and the Identity Provider has been configured by you, your platform will be ready to use Single Sign-On as the login method on the platform.
The default login URL will change from /user/login to /saml_login which will change the Single-Sign-On procedure for a user. The default login button on the platform will also be changed to use this route. Manually created buttons, will need to be updated by a site manager. Site and Content managers who already had an account will still be able to sign in to Open Social with their existing account by visiting /user/login manually.
Note: the /saml_login route is not reachable for already authenticated users.
Configuring ADFS for use with Open Social SimpleSAML
The Open Social SAML setup requires some specific claims that may be slightly different from other configurations of your ADFS service. Below are the steps to configure the attributes as described in the set-up section.
The instructions below assume that you have already created a new Relying Party for Open Social. The information needed to configure a Relying Party is provided at the start of this article.
Configure a transient Name ID
Open Social expects a transient Name ID. This is a security matter to ensure that login details for Open Social can not accidentally be used for other systems linked to the ADFS server.
- Click "Relying Party Trusts"
- Select the Relying Party created for Open Social
- Click "Edit Claim Issuance Policy"
- Click "Add rule"
- Choose "Transform an incoming claim"
- Click "Next"
- Call the rule "UPN to Transient Name ID"
- For "Incoming claim type" choose "UPN"
- For "Outgoing claim type" choose "Name ID"
- For "Outgoing name ID format" choose "Transient Identifier"

Configure the Mail attribute
Open Social requires a mail attribute which is an alternative name for the default "E-mail-address":
- Click "Relying Party Trusts"
- Select the Relying Party created for Open Social
- Click "Edit Claim Issuance Policy"
- Click "Add rule"
- Choose "Send LDAP Attributes as claims"
- Click "Next"
- Call the rule "Mail"
- Select the attribute store "Active Directory"
- Select the LDAP attribute "E-mail Addresses"
- If your organization uses a non-standard field to store user e-mail addresses, select that instead.
- Choose the outgoing claim type "mail" (this is not a standard attribute and must be typed manually).

Configure the eduPersonPrincipalName attribute
Open Social requires an eduPersonPrincipalName attribute which is used to link the Open Social user to the ADFS Identity Provider and will be adopted as username for the Open Social user.
- Click "Relying Party Trusts"
- Select the Relying Party created for Open Social
- Click "Edit Claim Issuance Policy"
- Click "Add rule"
- Choose "Send LDAP Attributes as claims"
- Click "Next"
- Call the rule "eduPersonPrincipalName"
- Select the attribute store "Active Directory"
- Select the LDAP attribute "User-Principal-Name"
- If your User-Principal-Name is an e-mail, you must choose a different LDAP attribute to use for the eduPersonPrincipalName as Open Social does not support using e-mail addresses for usernames.
Pick an attribute that is unique across the users that will be using Open Social and does not change over their lifetime. The value chosen for this attribute may be visible to users on the platform.
- If your User-Principal-Name is an e-mail, you must choose a different LDAP attribute to use for the eduPersonPrincipalName as Open Social does not support using e-mail addresses for usernames.
- Choose the outgoing claim type "eduPersonPrincipalName" (this may not be a standard attribute and may have to be typed manually).

Troubleshooting
Below we have included some troubleshooting information that can help you in configuring your Identity Provider to play well with Open Social. If you're encountering a problem that's not yet listed, please contact your Open Social support provider. If you solve a problem that's not yet listed, please also let us know so we can improve our documentation for others.
Testing the response sent by the Identity Provider
Use the following path on your platform to test the configuration of your identity provider.
/simplesaml/module.php/core/authenticate.php?as=drupal-sp
When the SAML integration has been configured by the Open Social team, this will redirect you to your Single Sign-On portal and bring you back to a debug screen that shows you the attributes sent from the Identity Provider to Open Social.
If you've made changes in your configuration and find that they are not being reflected on this page, then it could be that you're viewing an older session. Try an incognito window and make sure you've closed all incognito windows to ensure your session is terminated before starting a new one. Also check that the configuration changes on the Identity Provider have been properly persisted and that necessary services have been restarted to put the new configuration into effect.
I receive an internal server error page when I'm being redirected back to Open Social from the single sign-on portal
Make sure the attributes sent from the Identity Provider back to Open Social are configured correctly. Check the spelling of the attributes and ensure that data is actually sent as attributes and not in some other manner. See "Testing the response sent by the Identity Provider" for help with viewing the data sent from the Identity Provider.
I receive an error report page when I'm being redirected back to Open Social from the single sign-on portal
This usually indicates a misconfiguration on the Open Social side. Please be sure to submit your error report so Open Social developers are notified of the issue. The submitted error report contains information helpful in determining the issue.
I receive an error in ADFS during a federation passive request
Open Social requires a Name ID, which is a UPN. However, if you provide a 'normal' UPN you will get the error message shown below in your ADFS event log.
This error message indicates that Open Social expects a transient Name ID. This is a security matter to ensure that login details for Open Social can not accidentally be used for other systems linked to the ADFS server.
See the instructions for Configuring ADFS for use with Open Social SimpleSAML - Configure a transient Name ID on how to correctly configure your ADFS service.
Encountered error during federation passive request. Additional Data Protocol Name: Saml Relying Party: urn:drupal:adfs-saml Exception details: Microsoft.IdentityServer.Protocols.Saml.InvalidNameIdPolicyException: MSIS7070: The SAML request contained a NameIDPolicy that was not satisfied by the issued token. Requested NameIDPolicy: AllowCreate: True Format: urn:oasis:names:tc:SAML:2.0:nameid-format:transient SPNameQualifier: . Actual NameID properties: Format: , NameQualifier: SPNameQualifier: , SPProvidedId: . at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolManager.Issue(HttpSamlRequestMessage httpSamlRequestMessage, SecurityTokenElement onBehalfOf, String sessionState, String relayState, String& newSamlSession, String& samlpAuthenticationProvider, Boolean isUrlTranslationNeeded, WrappedHttpListenerContext context, Boolean isKmsiRequested) at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.RequestBearerToken(WrappedHttpListenerContext context, HttpSamlRequestMessage httpSamlRequest, SecurityTokenElement onBehalfOf, String relyingPartyIdentifier, Boolean isKmsiRequested, Boolean isApplicationProxyTokenRequired, String& samlpSessionState, String& samlpAuthenticationProvider) at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.BuildSignInResponseCoreWithSerializedToken(HttpSamlRequestMessage httpSamlRequest, WrappedHttpListenerContext context, String relyingPartyIdentifier, SecurityTokenElement signOnTokenElement, Boolean isKmsiRequested, Boolean isApplicationProxyTokenRequired) at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.BuildSignInResponseCoreWithSecurityToken(SamlSignInContext context, SecurityToken securityToken, SecurityToken deviceSecurityToken) at Microsoft.IdentityServer.Web.Protocols.Saml.SamlProtocolHandler.Process(ProtocolContext context) at Microsoft.IdentityServer.Web.PassiveProtocolListener.ProcessProtocolRequest(ProtocolContext protocolContext, PassiveProtocolHandler protocolHandler) at Microsoft.IdentityServer.Web.PassiveProtocolListener.OnGetContext(WrappedHttpListenerContext context)
For more information, contact your Open Social Support Contact.