You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Export-MsIdAzureMfaReport -- Compare-Object: Cannot bind argument to parameter 'DifferenceObject' because it is null. #64
A recent Microsoft email indicated that multifactor authentication is required for Azure from October 15, 2024. It gave a link to identify users without multifactor authentication enabled.
This documentation provided a link to Export-MsIdAzureMfaReport to generated a report.
Following the documentation results in the following error: Compare-Object: Cannot bind argument to parameter 'DifferenceObject' because it is null.
To Reproduce
PS C:\> Install-Module MsIdentityTools -Scope CurrentUser
PS C:\>
PS C:\> Connect-MgGraph -Scopes Directory.Read.All, AuditLog.Read.All, UserAuthenticationMethod.Read.All
Welcome to Microsoft Graph!
Connected via delegated access using [redacted]
Readme: https://aka.ms/graph/sdk/powershell
SDK Docs: https://aka.ms/graph/sdk/powershell/docs
API Docs: https://aka.ms/graph/docs
NOTE: You can use the -NoWelcome parameter to suppress this message.
PS C:\>
PS C:\> Export-MsIdAzureMfaReport .\report.xlsx
Compare-Object: Cannot bind argument to parameter 'DifferenceObject' because it is null.
Compare-Object: Cannot bind argument to parameter 'DifferenceObject' because it is null.
Write-Error: Unable to find target address
PS C:\>
Expected behavior
A generated report.
Or better error handling with a clear message indicated the problem and what to change in order to work.
Relevant documentation would be appreciated as well.
Screenshots
Environment (please complete the following information)
Unable to execute.
Operating System: Windows
PowerShell Version: PowerShell 7.4.4
MS Graph PowerShell SDK Module Version: ?
Additional context
Reacted by johannes-cogitaris, nicop85 and Rasmus Lorentzen
Sorry I'm not able to repro this. Can you run in -Verbose and share the specific point where it fails. Please remove any sensitive data before sharing. Alternatively, please open a support ticket with Microsoft and ask them to reach out to me. Tx.
Hi Merill Fernando (@merill).
Here is the output when appending -Verbose. I am not sure how sensitive the appids are but redacting just to be safe. Please let me know if I can provide any further details to assist.
I have the same issue. I also found that pasting the queries from the verbose log (https://graph.microsoft.com/beta/auditLogs/signIns) into the Microsoft graph explorer gives the same error:
I have Azure portals for both Personal (live.com) and Work & School accounts. Attempting the process with my Personal account produced the same error as above. Using my Work & School account displayed the following message:
You are using an Entra ID Free tenant which requires additional steps to download the sign-in logs.
Follow these steps to download the sign-in logs.
- Sign-in to https://entra.microsoft.com
- From the left navigation select: Identity → Monitoring & health → Sign-in logs.
- Select the 'Date' filter and set to 'Last 7 days'
- Select 'Add filters' → 'Application' and click 'Apply'
- Type in 'Azure' and click 'Apply'
- Select 'Download' → 'Download JSON'
- Set the 'File Name' of the first textbox to 'signins' and click 'Download'.
- Once the file is downloaded, copy it to the folder where the export command will be run.
Re-run this command with the -SignInsJsonPath parameter.
E.g.> Export-MsIdAzureMfaReport ./report.xlsx -SignInsJsonPath ./signins.json
Write-Error: Neither tenant is B2C or tenant doesn't have premium license
I followed those steps, but that didn't work either:
PS F:\_temp> Export-MsIdAzureMfaReport ./report.xlsx -SignInsJsonPath ./signins.json
PropertyNotFoundException: The property 'HasSignedInWithMfa' cannot be found on this object. Verify that the property exists.
PropertyNotFoundException: The property 'HasSignedInWithMfa' cannot be found on this object. Verify that the property exists.
Merill Fernando (@merill) I'm not sure how to verify. The above was initially done with the external account that originally provisioned the Azure account (Global Administrator).
I just now checked with another account (also Global Administrator) with the DNS configured to my Azure account. This time I am seeing what Joel Leach (@JoelLeach) mentioned above, but only for this account.
Merill Fernando (@merill)
I am experiencing the same error as JoelLeach.
I am getting the following error:
PS C:> Export-MsIdAzureMfaReport .\report.xlsx -SignInsJsonPath .\InteractiveSignIns.json
PropertyNotFoundException: The property 'HasSignedInWithMfa' cannot be found on this object. Verify that the property exists.
PropertyNotFoundException: The property 'HasSignedInWithMfa' cannot be found on this object. Verify that the property exists.
PropertyNotFoundException: The property 'HasSignedInWithMfa' cannot be found on this object. Verify that the property exists.
Merill Fernando (@merill) ,Thanks for the reply.
It worked fine with that version. I get the same error message as before, but the "report.xlsx" file creation completed perfectly
PS C:> Get-InstalledModule -Name MsIdentityTools
Version Name Repository Description
------- ---- ---------- -----------
2.0.68 MSIdentityTools PSGallery Tools for managing, troubleshooting, and reporting on…
PS C:> Export-MsIdAzureMfaReport .\report.xlsx -SignInsJsonPath .\SignIn.json
PropertyNotFoundException: The property 'HasSignedInWithMfa' cannot be found on this object. Verify that the property exists.
PropertyNotFoundException: The property 'HasSignedInWithMfa' cannot be found on this object. Verify that the property exists.
Activity
davenonwork commentedon Aug 18, 2024
Same issue.
merill commentedon Aug 21, 2024
Sorry I'm not able to repro this. Can you run in -Verbose and share the specific point where it fails. Please remove any sensitive data before sharing. Alternatively, please open a support ticket with Microsoft and ask them to reach out to me. Tx.
bendono commentedon Aug 21, 2024
Hi Merill Fernando (@merill).

Here is the output when appending -Verbose. I am not sure how sensitive the appids are but redacting just to be safe. Please let me know if I can provide any further details to assist.
Best regards.
merill commentedon Aug 22, 2024
I think you might have an old version of Graph installed.
Can you uninstall graph, restart PowerShell, check that graph is not installed, then do a fresh install of Microsoft.Graph and try again?
bendono commentedon Aug 22, 2024
I tried this but there was no change.
Uninstall:

Restart PowerShell and confirm that Graph is not installed anymore:

Re-installed Graph and re-tested:

antonhansson commentedon Aug 23, 2024
I have the same issue. I also found that pasting the queries from the verbose log (
https://graph.microsoft.com/beta/auditLogs/signIns) into the Microsoft graph explorer gives the same error:DogIcing commentedon Aug 24, 2024
Same issue
JoelLeach commentedon Aug 27, 2024
I have Azure portals for both Personal (live.com) and Work & School accounts. Attempting the process with my Personal account produced the same error as above. Using my Work & School account displayed the following message:
I followed those steps, but that didn't work either:
Indeed, there is no 'HasSignedInWithMfa' property in the JSON file. I already had MFA enabled on my Work & School account, so I added it to my Personal account using instructions at https://support.microsoft.com/en-us/account-billing/how-to-add-your-accounts-to-microsoft-authenticator-92544b53-7706-4581-a142-30344a2a2a57. Those instructions aren't quite right either, but I managed to get MFA setup. I just hope it works on October 15.
merill commentedon Aug 28, 2024
Ben Monroe (@bendono) and antonhansson are you signing in with a personal account or a work account?
bendono commentedon Aug 29, 2024
Merill Fernando (@merill) I'm not sure how to verify. The above was initially done with the external account that originally provisioned the Azure account (Global Administrator).
I just now checked with another account (also Global Administrator) with the DNS configured to my Azure account. This time I am seeing what Joel Leach (@JoelLeach) mentioned above, but only for this account.
smuehlst commentedon Sep 3, 2024
Same issue here.
Takas372 commentedon Sep 5, 2024
Merill Fernando (@merill)
I am experiencing the same error as JoelLeach.
I am getting the following error:
Will this error be fixed in the future?
merill commentedon Sep 11, 2024
Takas372 and Joel Leach (@JoelLeach) can you try running this older version when running with the Free tenant?
You will need to uninstall what you have and then install with this version
Takas372 commentedon Sep 13, 2024
Merill Fernando (@merill) ,Thanks for the reply.
It worked fine with that version. I get the same error message as before, but the "report.xlsx" file creation completed perfectly
My problem is solved! Thank you!
stmax82 commentedon Sep 27, 2024
Merill Fernando (@merill) Takas372 I tried using version 2.0.68, but I'm still getting the same error and the report.xlsx file is not created for me.
Is there another / easier way to get a list of users and their MFA status?
tdg5 commentedon Feb 26, 2025
I also hit this problem with version
2.0.68and2.0.70. I don't need a solution, but just wanted to chime in that the problem still exists.