You can use the Module AzureAD
Install-Module AzureAD # As Admin
And the connect to AzureAD
Connect-AzureAD
After that you can select various attributes, Ex:
Get-AzureADUser | select UserPrincipalName,usertype
In this example, the command retrieves the UPN and the user type. You can choose any attribute that you requiere.
Hope this helps,
Carlos Solís Salazar
----------
Please "Accept as Answer" and Upvote if any of the above helped so that, it can help others in the community looking for remediation for similar issues.