Powershell commands about MFA in Azure.

Gabriel Jurga 0 Reputation points
2023-03-01T17:52:44.92+00:00

Hello, I would like to ask you, if there is a powershell command I can use to obtain information if this setting (remember multi-factor authentication on devices they trust) is enabled or disabled and also a command to obtain the number of days users can trust devices for. Thank you.mfatrusted

Windows for business Windows Server User experience PowerShell
Microsoft Security Microsoft Entra Microsoft Entra ID
{count} votes

2 answers

Sort by: Most helpful
  1. Marilee Turscak-MSFT 37,206 Reputation points Microsoft Employee Moderator
    2023-03-01T22:50:16.3666667+00:00

    Hi Gabriel Jurga ,

    We do not appear to have specific commands for viewing if the "remember MFA" setting is enabled. If you are the admin and are configuring Per-User MFA settings, you should be able to check those settings and whether they are enabled in the per-user MFA configuration - Configure Azure AD Multi-Factor Authentication - Azure Active Directory - Microsoft Entra | Microsoft Learn.

     

    You can query the StrongAuthenticationMethods for reporting on MFA registration statuses and authentication type, but I do not think you can filter or check for the "remember multi-factor authentication" setting. Reference - Sign-in event details for Azure AD Multi-Factor Authentication - Azure Active Directory - Microsoft Entra | Microsoft Learn

    You can also try the Get-AzureADPolicy command to see if you can retrieve any info on the MFA policy.

    Otherwise if you want to check whether the "Remember MFA" setting is enabled without using Powershell, you can see that information in the Sign-in Authentication logs - Azure AD Multi-Factor Authentication prompts and session lifetime - Microsoft Entra | Microsoft Learn

    User's image

    Let me know if this helps and if you have further questions. If you would like to leave feedback for the product team to include this feature, you can reach out to them directly in the Feedback forum. https://feedback.azure.com/

    If you provide some justification for your use case I will also be happy to pass your feedback along.

    If the information helped you, please Accept the answer. This will help us as well as others in the community who might be researching the same question.

    1 person found this answer helpful.
    0 comments No comments

  2. David Broggy 6,291 Reputation points MVP Volunteer Moderator
    2023-03-01T18:03:03.8466667+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.