Skip to content

Commit

Permalink
✨ Add audit log for user, add creation type and identities.
Browse files Browse the repository at this point in the history
Signed-off-by: Preslav <preslav@mondoo.com>
  • Loading branch information
preslavgerchev committed Dec 3, 2024
1 parent a70649a commit 87da887
Show file tree
Hide file tree
Showing 4 changed files with 628 additions and 0 deletions.
49 changes: 49 additions & 0 deletions providers/ms365/resources/ms365.lr
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,55 @@ private microsoft.user @defaults("id displayName userPrincipalName") {
authMethods() microsoft.user.authenticationMethods
// Whether MFA is enabled for the user.
mfaEnabled() bool
// The user creation type.
creationType string
// The user's identities.
identities []microsoft.user.identity
// The user's audit-log.
auditlog() microsoft.user.auditlog

Check warning on line 148 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`auditlog` is not a recognized word. (unrecognized-spelling)

Check warning on line 148 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`auditlog` is not a recognized word. (unrecognized-spelling)
}

// Microsoft User Audit log
private microsoft.user.auditlog {

Check warning on line 152 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`auditlog` is not a recognized word. (unrecognized-spelling)
// The user's identifier.
userId string
// The user's sign-in entries. Only entries from the last 24 hours are fetched and up to 50 at most.
// Note that only interactive sign-in entries are currently returned.
signins() []microsoft.user.signin

Check warning on line 157 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`signins` is not a recognized word. (unrecognized-spelling)

Check warning on line 157 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`signin` is not a recognized word. (unrecognized-spelling)
// The user's last interactive sign-in
lastInteractiveSignIn() microsoft.user.signin

Check warning on line 159 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`signin` is not a recognized word. (unrecognized-spelling)
// The user's last non-interactive sign-in
lastNonInteractiveSignIn() microsoft.user.signin

Check warning on line 161 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`signin` is not a recognized word. (unrecognized-spelling)
}

// Microsoft User Identity
private microsoft.user.identity @defaults("issuerAssignedId") {
// The id as assigned by the issuer.
issuerAssignedId string
// The identity issuer.
issuer string
// The sign-in type for the identity (e.g. 'federated', 'userPrincipalName')
signInType string
}

// Microsoft User Sign in
private microsoft.user.signin {

Check warning on line 175 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`signin` is not a recognized word. (unrecognized-spelling)
// The sign-in entry's identifier.
id string
// The creation time of the sign-in entry.
createdDateTime time
// The id of the user.
userId string
// The display name of the user.
userDisplayName string
// The client app, used to perform the sig-in.
clientAppUsed string
// The app's display name.
appDisplayName string
// The resource display name.
resourceDisplayName string
// Whether the sign-in was interactive.
interactive bool
}

// Microsoft Entra authentication methods
Expand Down
Loading

0 comments on commit 87da887

Please sign in to comment.