Skip to content

Instantly share code, notes, and snippets.

@haxibami
Created March 22, 2024 09:50
Show Gist options
  • Save haxibami/b77832478ade0e921083ca95bfe6b0ce to your computer and use it in GitHub Desktop.
Save haxibami/b77832478ade0e921083ca95bfe6b0ce to your computer and use it in GitHub Desktop.
A script to sign in to Microsoft Entra ID using passkeys in unsupported environments (e.g. Firefox for Linux)

A script to sign in to Microsoft Entra ID using passkeys in unsupported environments (e.g. Firefox for Linux)

About

The latest versions of Firefox for Linux support FIDO2 / passkey sign-in. This works as expected for most websites, including login.live.com (which is an endpoint for personal MS account).

However, login.microsoftonline.com, which is for MS Entra ID, intentionally blocks this feature on Firefox. This is probably because Firefox for Linux is not in the Officially supported environments.

This can be overridden in two ways. One is to change the User-Agent (by devtool or some extension), and the other is to rewrite configuration objects for login.microsoftonline.com web app. This script does the latter.

Usage

  1. Open your organization's Microsoft Entra ID page (the URL will likely start with login.microsoftonline.com).
  2. Run this script (using bookmarklet or any other equivalent).
  3. Click "Sign-in Options".
  4. Return to the top.
  5. Click "Sign-in Options" again.
  6. You should see a passkey option.

Related

webcompat/web-bugs#101753

(function(){window.$Config.urlFidoLogin="https://login.microsoft.com/common/fido/get?uiflavor=Web";window.$Config.fIsFidoSupported=true;window.$Config.urlPost="https://login.microsoftonline.com/common/login";window.$Config.urlPostAad="https://login.microsoftonline.com/common/login";})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment