Skip to content

Commit

Permalink
⭐️ microsoft 365 user authentication methods
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-rock committed Aug 16, 2024
1 parent 37d5103 commit e1b8fa9
Show file tree
Hide file tree
Showing 6 changed files with 487 additions and 38 deletions.
5 changes: 5 additions & 0 deletions providers/ms365/resources/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ func transformError(err error) error {
}
return err
}

func isOdataError(err error) (*odataerrors.ODataError, bool) {
oDataErr, ok := err.(*odataerrors.ODataError)
return oDataErr, ok
}
24 changes: 24 additions & 0 deletions providers/ms365/resources/ms365.lr
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,30 @@ private microsoft.user @defaults("id displayName userPrincipalName") {
job() dict
// Contact information
contact() dict
// Authentication information
authMethods() microsoft.user.authenticationMethods
}

// Microsoft Entra authentication methods
private microsoft.user.authenticationMethods @defaults("count") {
// Count of authentication methods
count int
// Phone number and type registered to a user
phoneMethods []dict
// Email authentication method for self-service password reset (SSPR)

Check failure on line 107 in providers/ms365/resources/ms365.lr

View workflow job for this annotation

GitHub Actions / Run spell check

`SSPR` is not a recognized word. (unrecognized-spelling)
emailMethods []dict
// FIDO2 security key registered to a user
fido2Methods []dict
// Software OATH token registered to a user
softwareMethods []dict
// Microsoft Authenticator app registered to a user
microsoftAuthenticator []dict
// User password authentication method
passwordMethods []dict
// Temporary Access Pass registered to a user
temporaryAccessPassMethods []dict
// Windows Hello for Business authentication method registered to a user
windowsHelloMethods []dict
}

// Microsoft group
Expand Down
223 changes: 190 additions & 33 deletions providers/ms365/resources/ms365.lr.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions providers/ms365/resources/ms365.lr.manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ resources:
microsoft.user:
fields:
accountEnabled: {}
authMethods:
min_mondoo_version: 9.0.0
city: {}
companyName: {}
contact:
Expand Down Expand Up @@ -359,6 +361,19 @@ resources:
userType: {}
is_private: true
min_mondoo_version: 5.15.0
microsoft.user.authenticationMethods:
fields:
count: {}
emailMethods: {}
fido2Methods: {}
microsoftAuthenticator: {}
passwordMethods: {}
phoneMethods: {}
softwareMethods: {}
temporaryAccessPassMethods: {}
windowsHelloMethods: {}
is_private: true
min_mondoo_version: 9.0.0
ms365.exchangeonline:
fields:
adminAuditLogConfig: {}
Expand Down
11 changes: 11 additions & 0 deletions providers/ms365/resources/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,17 @@ func newUserSettings(p models.UserSettingsable) *UserSettings {
}
}

type Authentication struct {
}

func newAuthentication(p models.Authenticationable) *Authentication {
if p == nil {
return nil
}
return &Authentication{}

}

type (
DeviceAndAppManagementAssignmentSource int
DeviceAndAppManagementAssignmentFilterType int
Expand Down
Loading

0 comments on commit e1b8fa9

Please sign in to comment.