Guides

There are four primary ways to actually kick off the sign-in with Microsoft flow.

HTML Link

One option is to create a link that the user clicks in order to log in. The HREF for that link would be the Authorize URL that you created previously:

<a href="https://{yourOktaDomain}/oauth2/v1/authorize?idp=0oaaq9pjc2ujmFZexample&client_id=GkGw4K49N4UEE1example&response_type=id_token&response_mode=fragment&scope=openid&redirect_uri=https%3A%2F%2FyourAppUrlHere.com%2Fsocial_auth&state=WM6D&nonce=YsG76jo">Login With Microsoft</a>

After clicking this link, the user will be prompted to sign in with the social provider. After they succeed they will be returned to the specified redirect_uri along with an ID Token in JWT format.

Custom Okta-hosted Sign-in Page

If you have configured an Custom Okta-hosted Sign-in Page, you can add a "Login with Microsoft" button by adding the following code:

idps: [
  {type: 'MICROSOFT', id: '$Your_MS_IDP_ID_Here'}
]

Okta Sign-in Widget

Okta also offers an easily embeddable JavaScript widget that reproduces the look and behavior of the standard Okta sign-in page. Adding a "Login with Microsoft" button is as simple as adding the following code to your configuration:

idps: [
  {type: 'MICROSOFT', id: '$Your_MS_IDP_ID_Here'}
]

You can find out more about it on GitHub. Implementing login with Microsoft would use the Widget's OpenID Connect authentication flow.

AuthJS

If you don't want pre-built views, or need deeper levels of customization, then you can use the same AuthJS SDK that the Sign-in Widget is built with. For further information see the AuthJS GitHub repo. Implementing login with Microsoft would use the SDK's OpenID Connect authentication flow.

Featured Guides