Skip to Main Content
Liongard Library

Welcome to Liongard Library, where Lions share! This is a community-led space where Liongard users can come to teach and learn from one another.
Share custom Metrics, get inspired and see what’s trending in the Pride.

Pride Etiquette:
➕ Have great custom Metrics? Add them as entries!
🌟 Want to use a Metric? Copy the query and
follow this doc.
👍 Tried a Metric from the Library? Like it!
📣 Have a question or feedback on a Metric? Add a comment!
🔎 Not sure where to start? Learn about Metrics and how to write them.
💬 Need help writing a metric or want to help support others? Join the conversation in our Liongard Lounge #metrics slack channel.


🥴 See something off? Open a support chat to let us know.

Categories Microsoft 365
Created by Charles Van Duynhoven
Created on Nov 22, 2021

[Microsoft 365: Non-Admin, Non-Guest, License Assigned, MFA disabled]

This query looks for non-admin users who have an active license within your organization that do not have MFA enabled (ignoring guest users).

Query

Users[? Privileged == `No` && userType != `Guest` && Assigned_Products!=`""` && isMfaRegistered_r == `Disabled`].displayName

  • Attach files
  • Lamont Largie
    Reply
    |
    Jan 30, 2023

    You can replace the "ExcludedGroupName" with the name of the group you would like to exclude. You can also select multiple groups with something like this:


    Users[? Privileged == `No` && userType != `Guest` && Assigned_Products!=`""` && isMfaRegistered_r == `Disabled` && !contains(Groups, `ExcludedGroupName1, ExcludedGroupName2, etc`)].displayName

  • Lamont Largie
    Reply
    |
    Jan 30, 2023

    You can replace the "ExcludedGroupName" with the name of the group you would like to exclude. You can also select multiple groups with something like this:Users[? Privileged == `No` && userType != `Guest` && Assigned_Products!=`""` && isMfaRegistered_r == `Disabled` && !contains(Groups, `ExcludedGroupName`)].displayName

  • Lamont Largie
    Reply
    |
    Jan 30, 2023

    Hey Scott a group exclusion would look like this:


    Users[? Privileged == `No` && userType != `Guest` && Assigned_Products!=`""` && isMfaRegistered_r == `Disabled` && !contains(Groups, `ExcludedGroupName`)].displayName

  • Scott Stafford
    Reply
    |
    Aug 22, 2022

    I like this Query, but how would you modify to exclude users from a group, say !MFA Exclude

    There are Conference Rooms etc that wouldn't be able to use MFA.

  • Ben Jones
    Reply
    |
    Feb 8, 2022

    Just FYI:

    Liongard: So for that field to show information, the environment needs an Azure Premium P1 license or higher