Search Results :

×

Configure ADFS Single Sign-On (SSO) with OAuth for WordPress

OAuth & OpenID Connect Single Sign-On (SSO) plugin for WordPress enables secure login into WordPress using ADFS as an OAuth and OpenID Connect provider. You can also configure the plugin using different custom providers and standard IdPs. It supports advanced Single Sign-On (SSO) features such as user profile Attribute mapping, Role mapping, etc. Here we will go through a guide to configure SSO between WordPress and ADFS. By the end of this guide, users should be able to login to WordPress from ADFS. To know more about other features we provide in the OAuth Single Sign-On (OAuth & OpenID Connect Client) plugin, you can click here.

  • Log into your WordPress instance as an admin.
  • Go to the WordPress Dashboard -> Plugins and click on Add New.
  • Search for a OAuth Single Sign On (SSO) Plugin for WordPress and click on Install Now.
  • Once installed click on Activate.

  • To perform SSO with ADFS as Provider, your application must be https enabled.
  • Navigate to Server Manager Dashboard -> Tools -> ADFS Management.
Configure ADFS SSO (Single Sign-On) - ADFS Management

  • Navigate to ADFS -> Application Groups. Right click on Application Groups & click on Add Application group then enter Application Name. Select Server Application & click on next.
Configure ADFS SSO (Single Sign-On) - Application Groups

  • Copy Client Identifier. This is your Client ID. Add Callback URL in Redirect URL. You can get this callback URL from the miniOrange OAuth Client Single Sign-On (SSO) plugin. Click on next.
Configure ADFS SSO (Single Sign-On) - Client Identifier

  • Click on Generate shared secret. Copy the Secret value. This is your Client Secret. Click on Next.
Configure ADFS SSO (Single Sign-On) - Generate Client Secret

  • On the Summary screen, click Next. On the Complete screen, click Close.
  • Now, right-click on the newly added Application Group and select Properties.
  • Click on Add application from App Properties.
  • Click on the Add application. Then select Web API and click Next.
Configure ADFS SSO (Single Sign-On) - Add Application Web API

  • On the Configure Web API screen, enter the domain name address into the Identifier section. Click Add. Click Next.
Configure ADFS SSO (Single Sign-On) - Configure Web API

  • On the Choose Access Control Policy screen, select Permit everyone and click Next.
Configure ADFS SSO (Single Sign-On) - Access Control Policy

  • On the Configure Application Permission, by default openid is selected as a scope. You can select email and profile as well, then click on next.
Configure ADFS SSO (Single Sign-On) - Configure Application Permission

  • On the Summary screen, click Next. On the Complete screen, click Close.
  • On the Sample Application Properties click OK.

You have successfully configured ADFS as OAuth Provider for achieving ADFS login into your WordPress Site.


  • Go to Configure OAuth tab and click Add New Application to add a new client application into your website.
ADFS Single Sign-On (SSO) OAuth - Add New Application

  • Choose your Application from the list of OAuth / OpenID Connect Providers, here ADFS
ADFS Single Sign-On (SSO) OAuth - Select Application

  • Copy the Callback URL to be used in OAuth Provider Configuration. Click Next.
ADFS Single Sign-On (SSO) OAuth - Callback URL

  • You need to enter the App name and Endpoints here, for that please refer the below table and click on Next.
  • Note and Contact Us - SSO between two WordPress sites

    Note: Once you create the ADFS account, you'll find the Domain URL, and you will need to add the same in the below endpoints.


    Authorize Endpoint: https://{Domain URL}/adfs/oauth2/authorize
    Access Token Endpoint: https://{Domain URL}/adfs/oauth2/token
    Get User Info Endpoint: https://{Domain URL}/adfs/oauth2/userinfo
ADFS Single Sign-On (SSO) OAuth - Add App Name and Endpoints

  • Enter the Client Credentials like Client ID & Client Secret as shown in the setup dialogue box, openid is already filled. Click Next.
ADFS Single Sign-On (SSO) OAuth - Client ID and Client Secret

  • Click on Finish to save the configuration.
ADFS Single Sign-On (SSO) OAuth - Finish Configuration

You have successfully configured WordPress as OAuth Client for achieving user authentication with ADFS Single Sign-On (SSO) login into your WordPress Site.

  • Go to Configure OAuth tab and search your application name to add a new client application into your website, here ADFS.
ADFS Single Sign-On (SSO) OAuth - Add New Application

  • Insert your ADFS domain here and configure Client ID and Client Secret received from ADFS' Configuration and click Save Settings.
  • Please refer the below table for configuring the scope & endpoints for ADFS in the plugin.
  • Note and Contact Us - SSO between two WordPress sites

    Note: Once you create the ADFS account, you'll find the Domain URL, and you will need to add the same in the below endpoints.


    Scope: openid
    Authorize Endpoint: https://{yourADFSDomain}/adfs/oauth2/authorize/
    Access Token Endpoint: https://{yourADFSDomain}/adfs/oauth2/token/
ADFS Single Sign-On (SSO) OAuth - Add Domain

  • Choose your Grant Type from the list of options & Click on Save Settings to save the configuration.
ADFS Single Sign-On (SSO) OAuth - Add Grant Type

You have successfully configured WordPress as OAuth Client for achieving user authentication with ADFS Single Sign-On (SSO) login into your WordPress Site.

  • User Attribute Mapping is mandatory for enabling users to successfully login into WordPress. We will be setting up user profile attributes for WordPress using below settings.

Finding user attributes:

  • Go to Configure OAuth tab. Scroll down and click on Test Configuration.
Configure ADFS SSO (Single Sign-On) - Test Configuration

  • You will see all the values returned by your OAuth Provider to WordPress in a table. If you don't see value for First Name, Last Name, Email or Username, make the required settings in your OAuth Provider to return this information.
Configure ADFS SSO (Single Sign-On) - Test Configuration Result

  • Once you see all the values in Test Configuration, go to Attribute / Role Mapping tab, you will get the list of attributes in the dropdowns.
Configure ADFS SSO (Single Sign-On) - Attribute / Role Mapping


  • Click on "Test Configuration" and you will get the list of Attribute Names and Attribute Values that are sent by your OAuth provider.
  • From the Test Configuration window, map the Attribute Names in the Attribute Mapping section of the plugin. Refer to the screenshot for more details.
Configure ADFS SSO (Single Sign-On) - Attribute Mapping

  • Enable Role Mapping: To enable Role Mapping, you need to map Group Name Attribute. Select the attribute name from the list of attributes which returns the roles from your provider application.
    Eg: Role
Configure ADFS SSO (Single Sign-On) - Role Mapping

  • Assign WordPress role to the Provider role: Based on your provider application, you can allocate the WordPress role to your provider roles. It can be a student, teacher, administrator or any other role depending on your application. Add the provider roles under Group Attribute Value and assign the required WordPress role in front of it under WordPress Role.

    For example, in the below image, Teacher has been assigned the role of Administrator & Student is assigned the role of Subscriber.
Configure ADFS SSO (Single Sign-On) - Role Mapping WordPress Roles

  • Once you save the mapping, the provider role will be assigned the WordPress administrator role after SSO.
    Example: As per the given example, Users with role 'teacher' will be added as Administrator in WordPress and 'student' will be added as Subscriber.

  • Open the ADFS Management tool located under the Tools menu at the top right of the Server Manager.
  • Select the Application Groups folder item in the left sidebar.
Configure ADFS SSO (Single Sign-On) - Go to Application Groups

  • Double click on the group added earlier, then double click on the Web API application.
Configure ADFS SSO (Single Sign-On) - Select Web API Application

  • Select the tab named Issuance Transform Rules. Click the Add Rule button at the bottom.
Configure ADFS SSO (Single Sign-On) - Add Issuance Transform Rule

  • Select Send LDAP Attributes as Claims and click next.
Configure ADFS SSO (Single Sign-On) - Send LDAP Attributes as Claims

  • Give the rule a name, for example Roles and select "Active Directory" as the "Attribute Store".
Configure ADFS SSO (Single Sign-On) - Active Directory Attribute Store

  • In the table below, select Token-Groups Unqualified Names in the first column and type roles into the second column.
Configure ADFS SSO (Single Sign-On) - Token Groups Unqualified Names

  • Open the ADFS Management tool located under the Tools menu at the top right of the Server Manager.
  • Select the Application Groups folder item in the left sidebar.
Configure ADFS SSO (Single Sign-On) - Go to Application Groups

  • Double click on the group added earlier, then double click on the Web API application.
Configure ADFS SSO (Single Sign-On) - Select Web API Application

  • Select the tab named Issuance Transform Rules. Remove any rules you may have already added and click on the Add Rule button at the bottom.
Configure ADFS SSO (Single Sign-On) - Add Issuance Transform Rule

  • Select Send Claims Using a Custom Rule and click next.
Configure ADFS SSO (Single Sign-On) - Send Claims Using a Custom Rule

  • Give the rule the name StoreRoles and paste the following into the Custom rule field:
  • c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] => add(store = "Active Directory", types = ("roles"), query = ";tokenGroups;{0}", param = c.Value);
Configure ADFS SSO (Single Sign-On) - StoreRoles Custom Rule

  • Click finish and add yet another rule.
  • Again, select Send Claims Using a Custom Rule and click next.
  • Give this rule the name IssueRoles and paste the following into the Custom rule field:
  • c:[Type == "roles", Value =~ "^Prefix.+"] => issue(claim = c);
Configure ADFS SSO (Single Sign-On) - IssueRoles Custom Rule

  • The part containing //"^Prefix.+"// is a regex expression used to filter the windows groups sent as part of the claims. In this case we only accept the windows groups starting with "Prefix". Adjust this to meet your needs.
  • Click finish.
  • The settings in the Single Sign-On (SSO) Settings tab define the user experience for Single Sign-On (SSO). To add a Okta login widget on your WordPress page, you need to follow the below steps.
  • Go to WordPress Left Panel > Appearances > Widgets.
  • Select miniOrange OAuth. Drag and drop to your favourite location and save.
Configure ADFS SSO (Single Sign-On) - WordPress Login Button Setting

  • Go to WordPress Left Panel > Appearances > Widgets.
  • Select miniOrange OAuth. Drag and drop to your favourite location and save.
Configure ADFS SSO (Single Sign-On) - WordPress Login Button Setting

  • Open your WordPress page and you can see the ADFS SSO login button there. You can test the ADFS Single Sign-On (SSO) now.
  • Make sure the "Show on login page" option is enabled for your application. (Refer to the below image)
Configure ADFS SSO (Single Sign-On) - Show On Login Page Option

  • Now, go to your WordPress Login page. (Eg. https://< your-wordpress-domain >/wp-login.php)
  • You will see an ADFS SSO login button there. Once you click the login button, you will be able to test the ADFS Single Sign-On (SSO).
Configure ADFS SSO (Single Sign-On) - Login Button


In this Guide, you have successfully configured ADFS Single Sign-On (SSO) by configuring ADFS as OAuth Provider and WordPress as OAuth Client using our OAuth Single Sign-On (OAuth / OpenID Connect Client) plugin. This solution ensures that you are ready to roll out secure access to your WordPress site using ADFS login credentials within minutes.



 Thank you for your response. We will get back to you soon.

Something went wrong. Please submit your query again

We'll Reach Out to You at the Earliest!


ADFS_sso ×
Hello there!

Need Help? We are right here!

support