Skip to content

Commit

Permalink
🐛 Fix the wrong iterator in user registration details. (#4817)
Browse files Browse the repository at this point in the history
Signed-off-by: Preslav <[email protected]>
  • Loading branch information
preslavgerchev authored Nov 5, 2024
1 parent df77016 commit 4a2b16b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions providers/ms365/resources/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

betamodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
"github.com/microsoftgraph/msgraph-beta-sdk-go/reports"
betausers "github.com/microsoftgraph/msgraph-beta-sdk-go/users"
"github.com/microsoftgraph/msgraph-sdk-go/models"
"github.com/microsoftgraph/msgraph-sdk-go/users"
"go.mondoo.com/cnquery/v11/llx"
Expand Down Expand Up @@ -70,7 +69,7 @@ func (a *mqlMicrosoft) users() ([]interface{}, error) {
if err != nil {
a.mfaResp = mfaResp{err: err}
} else {
userRegistrationDetails, err := iterate[*betamodels.UserRegistrationDetails](ctx, detailsResp, betaClient.GetAdapter(), betausers.CreateDeltaGetResponseFromDiscriminatorValue)
userRegistrationDetails, err := iterate[*betamodels.UserRegistrationDetails](ctx, detailsResp, betaClient.GetAdapter(), betamodels.CreateUserRegistrationDetailsCollectionResponseFromDiscriminatorValue)
// we do not want to fail the user fetching here, this likely means the tenant does not have the right license
if err != nil {
a.mfaResp = mfaResp{err: err}
Expand Down

0 comments on commit 4a2b16b

Please sign in to comment.