Find users using New Outlook via sign-in logs (Microsoft Graph)

Powershell-

 $startDate = Get-Date (Get-Date).AddDays(-90) -Format 'yyyy-MM-dd'

 

Get-MgBetaAuditLogSignIn -All -Filter "clientAppUsed eq 'Browser' and status/errorCode eq 0 and contains(UserAgent,'OneOutlook') and CreatedDateTime ge $startDate" | 
    Sort-Object CreatedDateTime -Descending | Select-Object -Property UserPrincipalName -Unique


Graph Explorer - 

This will extract all logs after 2024-04-27

https://graph.microsoft.com/beta/auditLogs/signIns?$filter=clientAppUsed eq 'Browser' and status/errorCode eq 0 and contains(UserAgent,'OneOutlook') and CreatedDateTime ge 2024-04-27


This will extract logs between 2024-06-26 and 2024-06-26

https://graph.microsoft.com/beta/auditLogs/signIns?$select=userPrincipalName,createdDateTime&$filter=clientAppUsed eq 'Browser' and status/errorCode eq 0 and contains(UserAgent,'OneOutlook') and createdDateTime ge 2024-06-26 and createdDateTime le 2024-06-26

No comments: