Unable to extract a field attribute from Azure when exported to a csv

Asif, Syed 0 Reputation points
2024-10-18T19:23:28.5266667+00:00

In the Microsoft Entra ID I have entered mobile phone numbers of users for doing MFA. However, when I export data from Entra ID to a csv file, the mobile phone number field shows blank. How can I get a dump of the phone numbers from the Entra ID database?

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sandeep G-MSFT 20,906 Reputation points Microsoft Employee Moderator
    2024-10-21T12:25:05.69+00:00

    @Asif, Syed

    Thank you for posting this in Microsoft Q&A.

    As I understand you are trying to pull list of users in Entra ID along with the phone numbers of users that they have registered for MFA.

    This cannot be pulled using GUI. Because if you export uses from Entra ID portal, it will only list the phone numbers of users if they have added in there User properties or if there phone number is synced from on-premises to Entra ID.

    You will get this registered phone numbers from MFA registered numbers.

    You will have to use the PowerShell script to get this information. Follow below script to get the required information.

    Get-MgUser -All:$true -PipelineVariable user | ForEach-Object {
        Get-MgUserAuthenticationPhoneMethod -UserId $user.UserPrincipalName |
            Select-Object @{ N='UserPrincipalName'; E={ $user.UserPrincipalName }}, ID, PhoneNumber, PhoneType
    }
    

    Let me know if you have any further questions.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    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.