msgraph-sdk-powershell icon indicating copy to clipboard operation
msgraph-sdk-powershell copied to clipboard

Add support for Non-Interactive sign-in in Get-MgAuditLogSignIn

Open weyCC81 opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe the problem.

Not a direct problem, can be workaround with Get-MgBetaAuditLogSignIn

Get-MgAuditLogSignIn : Invalid filter clause

Describe the solution you'd like.

Add an Attribute in Get-MgAuditLogSignIn instead of a Filter in Get-MgBetaAuditLogSignIn

Stable (Request)

  • Parameter Option 1: SignInType = [Interactive, NonInteractive, Service principal, Managed Identity, All]
  • Parameter Option 2: ShowNonInteractive (isInteractive": false)

Beta (Existing) $Filter3B = "(signInEventTypes/any(t: t ne 'interactiveUser'))" $Filter3A = "(signInEventTypes/any(i:i eq 'nonInteractiveUser')) and status/errorCode eq 0" Get-MgBetaAuditLogSignIn -Filter $Filter3A -Top 10000 -Property *

Additional context?

Get-MgAuditLogSignIn -Filter "signInEventTypes/any(t:t eq 'servicePrincipal')'"

Related to: https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2753 https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/956 https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2753 (https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/1261) https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.beta.reports/get-mgbetaauditlogsignin?view=graph-powershell-beta#example-3-retrieve-the-first-10-sign-ins-where-the-signineventtype-is-not-interactiveuser-starting-with-the-latest-sign-in https://learn.microsoft.com/en-us/powershell/module/microsoft.graph.reports/get-mgauditlogsignin?view=graph-powershell-1.0 https://learn.microsoft.com/en-us/graph/api/signin-get?view=graph-rest-1.0&tabs=http

weyCC81 avatar Aug 12 '24 12:08 weyCC81