Skip to content

Commit

Permalink
🐛 Fix nil state for missing signin entries. (#4960)
Browse files Browse the repository at this point in the history
Signed-off-by: Preslav <[email protected]>
  • Loading branch information
preslavgerchev authored Dec 9, 2024
1 parent da4b586 commit 01c2e8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions providers/ms365/resources/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ func (a *mqlMicrosoftUserAuditlog) lastInteractiveSignIn() (*mqlMicrosoftUserSig
return nil, signIns.Error
}
if len(signIns.Data) == 0 {
a.LastInteractiveSignIn.State = plugin.StateIsSet | plugin.StateIsNull
return nil, nil
}

Expand All @@ -387,6 +388,7 @@ func (a *mqlMicrosoftUserAuditlog) lastNonInteractiveSignIn() (*mqlMicrosoftUser
return nil, err
}
if len(signIns) == 0 {
a.LastNonInteractiveSignIn.State = plugin.StateIsSet | plugin.StateIsNull
return nil, nil
}
return signIns[0], nil
Expand Down

0 comments on commit 01c2e8d

Please sign in to comment.