Add "Sign in with Microsoft" button anywhere (shortcode)
Use this guide if you want to add a "Sign in with Microsoft" button to any page or post of your WordPress website (or possibly to the header / footer area).
Before you start
- You must already have configured the single sign-on capability of the WordPress + Office 365 plugin.
- You are at least an Author for your WordPress website.
Using the shortcode
You can customize the shortcode as illustrated with the following example.
Administrators who have configured SAML 2.0 can use the previous example to create a custom button to include a domain hint that translates to an additional whr parameter as follows.
window.wpo365.pintraRedirect.toMsOnline('', '', 'example.com');