Tip #811: Multilingual portals and external authentication providers

After on and off hiatus caused by the festivities season we are back with another annual round of the daily tips.

If you have external authentication providers all worked out in your Dynamics 365 Portal, and then you enable multilingual feature so that your portal looks fine in, say, Kazakh (yes, it’s one of the officially supported 43 languages), you may find that the content now would have a different URL depending on the language. For example https://foobar.com/contact-us would become https://foobar.com/en-US/contact-us or https://foobar.com/kk-KZ/contact-us, depending on your audience choice.

That URL change will break authentication with the external providers and users trying to logon will see Page Not Found with the URL resembling https://foobar.com/en-US/signin-microsoft?code=etc.

Solution:

  1. Change site setting MultiLanguage/DisplayLanguageCodeInURL to False. That will ensure “old-style” navigation with the current language passed around in a cookie instead of a URL.
  2. If you are keen to retain language identifiers in your URLs, change callback/redirect URL on your provider side to include the code of any of the supported by your portal language code, e.g.
    https://foobar.com/kk-KZ/signin-microsoft, add the site setting
    Authentication/OpenAuth/Microsoft/CallbackPath and set it to
    /kk-KZ/signin-microsoft

 

Leave a Reply

Your email address will not be published. Required fields are marked *