Enabling QR code sign-in for Microsoft Entra ID

A recent change announcement posted to the ‘What’s new’ section of the Microsoft Entra admin center announced that QR code sign-in, a new authentication method for Frontline Workers, had gone into private preview.

In summary:

“We are introducing a new simple way for Frontline Workers to authenticate in Microsoft Entra ID with a QR code and PIN, eliminating the need to enter long UPNs and alphanumeric passwords multiple times during their shift.”

Limited information was released in the change announcement, a quick search through the Microsoft 365 roadmap and Google reveals no additional information. So I plan to dig a little deeper and try to enable this feature in my tenant.

Conveniently, I checked the Authentication Strengths page first, as I’m eagerly awaiting updates in this area. To my surprise, I saw a new single-factor authentication method option named ‘QR code (Preview)’. If I attempt to create a new Authentication Strength that includes this method, I am immediately greeted with an error message, it states that the method must first be enabled, make sense…

QR code method on the Authentication strengths page
QR code method on the Authentication strengths page

The only problem is, from my view of the Authentication methods page, there is no option to enable the QR code method.

Authentication methods list
Authentication methods list

From my experience, the fact the option was selectable from the Authentication Strength page, suggests that behind the scenes, the Microsoft Graph API is exposing the data but the web portal isn’t doing anything with it.

Que the Microsoft Graph Explorer tool and with this, I made a call to the authenticationmethodspolicy endpoint which low and behold gave me the following response.

{
    "@odata.type": "#microsoft.graph.qrCodePinAuthenticationMethodConfiguration",
    "id": "QRCodePin",
    "state": "disabled",
    "standardQRCodeLifetimeInDays": 365,
    "pinLength": 8,
    "excludeTargets": [],
    "[email protected]": "https://graph.microsoft.com/beta/$metadata#policies/authenticationMethodsPolicy/authenticationMethodConfigurations('QRCodePin')/microsoft.graph.qrCodePinAuthenticationMethodConfiguration/includeTargets",
    "includeTargets": []
}

Of course, if I were to start using this method I would need to enable it. So by crafting a response and sending a PATCH request to the following endpoint, the method was enabled.

https://graph.microsoft.com/beta/policies/authenticationMethodsPolicy/authenticationMethodConfigurations/QRCodePin

Here is the body of the request I used:

{
    "includeTargets": [
        {
            "id": "all_users",
            "isRegistrationRequired": false,
            "targetType": "group",
            "isUsableForSignIn": true
        }
    ],
    "state": "enabled"
}

This was validated by running a GET request to the authenticationmethodspolicy like before. You can see from the below that the method is now enabled and targeted to all users. 

Graph Explorer auth methods response
Graph Explorer auth methods response

Once done I was able to return back to the Authentication Strengths blade and create a new policy which includes my QR code. While it wasn’t completely necessary, this would mean I could enforce usage with Conditional Access. 

QR Code Preview
QR Code Preview

My hope in doing this was to potentially encourage some form of registration upon sign-in to the QR code method. However, this hasn’t worked and I am currently still none-the-wiser on how to obtain said QR code. I also have some reservations about how the QR code improves the login experience. The process (designed for mobile front-line workers) involved navigating to the Microsoft login page on a mobile browser, selecting “Sign in to an organisation” and then selecting “Sign in with a QR code”.

QR code sign in experience
QR code sign in experience

You can see from the above image that by following this flow you then need to scan a QR code to complete a single-factor sign-in. Assumingly, you would then need to complete your MFA challenge, which would likely be from the Microsoft Authenticator app.

Daniel Bradley

Daniel Bradley is a UK-based technical architect and Microsoft MVP in Security. He specialises in Microsoft Entra, Intune, and Microsoft Graph PowerShell and is the author of Microsoft Graph PowerShell for Administrators. He writes and edits Our Cloud Network using experience gained from working with Microsoft cloud environments.

This Post Has 2 Comments

  1. Allan

    Hi Daniel,

    Just testing this now and for the life of me, I can’t make the value for “isRegistrationRequired” true. Doesn’t matter how many times I “PATCH” it.

    Any clue?

    Cheers,
    Allan

    1. Daniel Bradley

      I think the APIs are hit and miss at the moment, although there shouldn’t be any need for the isRegistrationRequired to be enabled for this method I don’t believe.

Leave a Reply