Hi @EnterpriseArchitect ,
Thanks for reaching out.
To get the signIn activity and SignInSessionsValidFromDateTime properties of a user, you need to have the
AuditLog.Read.All
and Directory.Read.All
permissions.
You can try the following PowerShell command to view the SignInActivity
and SignInSessionsValidFromDateTime
properties of a user:
Import-Module Microsoft.Graph.Users
Connect-MgGraph -Scopes "AuditLog.Read.All","Directory.Read.All"
Get-MgUser | Select-Object UserPrincipalName, SignInActivity,SignInSessionsValidFromDateTime | Export-csv "$((Get-Date -format FileDateTimeUniversal).toString())_signin.csv"
The above command will export the xml file with below details:
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.