Add / Customize Single Sign-on button

Through the years, WPO365 has always provided developers and website administrators with ways to customize an SSO login button. Starting with version 33.0, a new feature that allows you to customize the SSO (Single Sign-on) button through a simple user interface, has been added to the plugin's Login / Logout configuration page.


Creating a custom SSO login button has become very straightforward since version 42.0. WPO365 now provides a dedicated endpoint on your WordPress site -  /wpo/sso/start (or ?wpo_sso_start=1 without permalinks). When users are directed to this URL (e.g. https:///wpo/sso/start>/wpo/sso/start), they are automatically redirected to Microsoft for authentication. As a result, a simple HTML link pointing to this URL is sufficient to initiate the Single Sign-On flow. Check the paragraph Creating your own custom SSO button below for detailed instructions.

Customize Login Button

  • Hide Sign in with Microsoft button on login page If checked, the SSO button will not be added to the default / custom login form. 
  • Hide Microsoft Logo If checked, the Microsoft logo will not be displayed.
  • Display text Customize the SSO button's label (default "Sign in with Microsoft").
  • Foreground color Change the color of the display text (default "#5E5E5E", must be a hexadecimal color code).
  • Background color Change the background color of the SSO button (default "#FFFFFF", must be a hexadecimal color code).
  • Hide border If checked, the SSO button's border width will be set to 0 pixel.
  • Border color Change the border color of the SSO button (default "#8C8C8C", must be a hexadecimal color code).

Add SSO button using the [wpo365-sso-button] shortcode

If you want - for example - to add the customized SSO button to a custom login page or to your theme's header and that location supports WordPress shortcodes, then you can copy the shortcode [wpo365-sso-button] to your clipboard and paste it anywhere. 

Creating your own custom SSO button

There may be situations where the out-of-the-box SSO button - even when customized - does not fully meet your requirements. In such cases, you can create a simple link-style button that directs users to the custom endpoint provided by the WPO365 plugin, for example https://<your-website>/wpo/sso/start (or https://<your-website>/?wpo_sso_start=1 when permalinks are disabled).
Additionally, this endpoint supports the following query parameters:
  • idp_id Alphanumeric characters only that identify the Identity Provider, in case you have defined multiple IdPs.
  • login_hint A valid email address.
  • redirect_to A valid URL where WPO365 should send the user after they signed in with SSO.
  • b2c_policy Alphanumeric characters - including hyphens and underscores - that identify the Azure AD B2C policy.

Troubleshoot

  • If you are using a customized login page and the default out-of-the-box WPO365 login button is not shown, then it's likely that your login page does not trigger the built-in WordPress login_form filter. If that is the case, you should add the button using one of the options introduced in this article.
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us