<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D50Z00008G7UiOSAVOkta Classic EngineOkta Integration NetworkAnswered2024-04-16T13:59:05.000Z2018-08-01T14:55:45.000Z2022-05-25T11:56:10.000Z
O365 redirect automatically populate username?
When redirected from O365 to Okta (outside the network - no IWA), is there a way to autopopulate the username?  The user entered it into O365, it seems redundant to ask them to enter it again on the Okta login screen. (ADFS auto populates)

so5gx and a0m8r like this.
  • vlad.huma1.5163136961455237E12 (Vendor Management)

    Hi Nikki,

     

    Sadly it doesn't autopopulate and we don't have any feature flags to enable that. You can suggest this on the Okta Community portal by using the 'Feedback' option at the bottom of the Okta admin console. Features suggested in our community are reviewed and can be voted and commented on by other members of the community, therefore making it much easier for the engineering team to understand the priorities that you have for feature requests. From there, the PM team will review the top 30 most voted upon ideas each month and provide feedback/roadmap status on these via the forum.

     

    Best regards,

     

    Vlad Huma
    Expand Post
  • mike.davie1.5312945692819849E12 (Customer First Programs)

    Hello Nikki,

    Thank you for posting your question into the Okta Community Portal! 😀

     

    If you receive a great answer to your question(s), help the community find it by marking it the best answer. Hover over the answer and click "Best Answer." 

     

    Thanks for participating in the Okta Community.  👍

     

    Mike Davie

    Okta Help Center Team
    Expand Post
  • JoelS.64685 (Customer)

    I was able to get autofill of the users O365 username working by customizing the sign-in page. Essentially just capture the username value in the html [head] section and feed that value to the 'username' config property of the sign-in widget if it's not null.

     

    Javascript for the header:

    function getParameterByName(name, url) {

      if (!url) url = window.location.href;

      name = name.replace(/[\[\]]/g, '\\$&');

      var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),

        results = regex.exec(url);

      if (!results) return null;

      if (!results[2]) return '';

      return decodeURIComponent(results[2].replace(/\+/g, ' '));

    }

    const queryUrl = decodeURIComponent(window.location.href);

    const redirect_uname = getParameterByName('username', queryUrl);

     

    Addition to the sign-in widget script:

     // "config" object contains default widget configuration

        // with any custom overrides defined in your admin settings.

        var config = OktaUtil.getSignInWidgetConfig();

    if(redirect_uname != null) {

    config.username = redirect_uname;

        }

     

    Expand Post
  • tliwi (tliwi)

    Hi Joel, would this work in reverse? Say if you wanted to prevent the username from being populated?

This question is closed.
Loading
O365 redirect automatically populate username?