none
List of all office 365 accounts without MFA enabled

All replies

  • Hi.

    List all Office 365 MFA Enabled Users


    MCITP, MCSE. Regards, Oleg

    Monday, June 25, 2018 2:18 PM
  • Hi Oleg,

    Thank you for sharing the link.

    But I am looking for :"Without MFA Enabled"

     

    Monday, June 25, 2018 6:13 PM
  • Hi,

    If you want to list the user without MFA enabled, we can modify the above script to filter user whose StrongAuthenticationMethods is null. For example:
    # Get all MFA Enabled users 
    Write-Host "Collecting Enabled MFA Users from MSOnline" -ForegroundColor Green 
    $MFAUsers = Get-Msoluser -all | Where-Object {$_.StrongAuthenticationMethods -eq $null} 

    Hope it helps.

    Best Regards,
    Allen Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Tuesday, June 26, 2018 3:47 AM
    Moderator
  • Hi Allen,

    Thank you for your help.

    I did and edited the script and when executed the script got this : 

    "

    cmdlet Get-Credential at command pipeline position 1
    Supply values for the following parameters:
    Credential
    Conneced to O365 MSOL Online
    Collecting Enabled MFA Users from MSOnline
    No MFA Users were found, exiting.

    "

    Could you please suggest me what is the next step?

    Tuesday, June 26, 2018 1:58 PM
  • Hi,

    How about run below command on Office 365 PowerShell?
    Get-Msoluser -all | Where-Object {$_.StrongAuthenticationMethods -eq $null}

    Best Regards,
    Allen Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, June 29, 2018 3:08 AM
    Moderator
  • Hi,

    Any further help we can do for you?
    If it's solved, would you please post the solution here to share it with us? 

    Also, please free to mark the useful reply as answer. Thanks for your cooperation.

    Best Regards,
    Allen Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Monday, July 2, 2018 2:15 AM
    Moderator
  • Hi Allen,

    As always, Thank you for your support.

    Just need to know if you have any script(Command) where we can find

    the list of users who have put their account in "Never Expired Mode"  and  MFA not Enabled.

    Is it feasible and can we get these details?

    Monday, July 2, 2018 3:02 PM
  • You're welcome.

    We can compare "PasswordNeverExpires" and "StrongAuthenticationMethods" filter together, for example:
    Get-Msoluser -all | Where-Object {($_.StrongAuthenticationMethods -eq $null) -and ($_.PasswordNeverExpires -eq $true)}

    Best Regards,
    Allen Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Thursday, July 5, 2018 3:26 AM
    Moderator
  • Hi Allen,

    Thank you for sharing your knowledge with us.

    Command executed successfully  but did not get any result.

    What can we understand when we do not get result.

    Thursday, July 5, 2018 8:35 PM
  • Well, I suppose that no user meets both conditions.
    You can change "And" to "Or" to check:
    Get-Msoluser -all | Where-Object {($_.StrongAuthenticationMethods -eq $null) -or ($_.PasswordNeverExpires -eq $true)} | FL Identity,StrongAuthenticationMethods,PasswordNeverExpires


    Best Regards,
    Allen Wang


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.
    Friday, July 6, 2018 2:34 AM
    Moderator
  • Hi Allen,

    It is great help till now.

    But still have some issue in exporting the result in CSV format.

    while adding pipeline | Export-CSV  "c:\....." unable to export the details, just getting some unexpected result in CSV format.

    we have more than 10k users.

    Could you please help me if you have any other command through which I could export exact details.

    Monday, July 9, 2018 9:16 PM