After login with microsoft login redirect to

Hello everybody,

From the developer console, I made a custom sign-in page. I have added a login button from the Mircosoft. It does work, but after login, I am being redirected to Is there a way to change this. Here is the code I used:

    "OktaUtil" defines a global OktaUtil object
    that contains methods used to complete the Okta login flow.

<script type="text/javascript">
	var config = {
    	baseUrl: orgUrl,
             idps: [
          {id: 'this_is_private', text: 'Login met Microsoft'}

    // Render the Okta Sign-In Widget
    var oktaSignIn = new OktaSignIn(config);
    oktaSignIn.renderEl({ el: '#okta-login-container' },
      function success(res) {
        	if(res.status === 'SUCCESS'){

      function error(err) {
        // This function is invoked with errors the widget cannot recover from:

Hi @ymzhang23

You can configure the widget to do a simple OIDC flow and redirect you to a specific page once the flow is completed. You can find here an example for implicit flow.

From widget point of view, you will need to set a few more attributes under config:

  • redirectUri - the URL where to redirect (this needs to be whitelisted also in the OIDC app in Okta)
  • clientId: the OIDC app’s client ID which can be found under the General tab
  • authParams.issuer - the issuer of the authorization server used
  • authParams.responseType - id_token, token or both
  • authParams.display - “page”
  • authParams.scopes - the scopes requested (it can be set to openid)

Here is an example of a configuration

var oktaSignIn = new OktaSignIn({
    baseUrl: "",
    clientId: "0oall5cfosYwGzfFA0h7",
    redirectUri: "",
    authParams: {
        issuer: "",
        responseType: ['token'],
		display: 'page',
		scopes: ['openid']

Thank you for you reaction.

Unfortunately, you solution doesnt work. I have applied this, and still it keep me redirect to

1 Like

Hi @ymzhang23

Can you please open a support ticket with us at in order to review the integration mentioned above?

Hi @dragos,

Do you mean sending an email to

Thank you again.

Hi @ymzhang23

Yes, please send us an email to and one of our Developer Support Engineers will assist you.

Hello @dragos,

Thank your for your message. I just send you an email.

Hello @ymzhang23 I want to create a same , Did you app redirect the givem URL ?

Yes, but I had to fill in in the parameters. not in the config.

customButtons: [{
                title: 'Login met Microsoft',
                className: 'btn-microsoft',
                click: function() {
                  // clicking on the button navigates to another page
                  window.location.href = '';

HI @ymzhang23,
so is your location.href redirect to and what state contain and noonce ,
and as per suggest by @dragos


I have tried but its not work for me , I need same as facebook work in Okta , it redirect to Fb , but I want to redirect to Okta login and after success to my home page