From 4a2b16b339370e89bdb3128afee6bf8fe140e7bd Mon Sep 17 00:00:00 2001 From: Preslav Gerchev Date: Tue, 5 Nov 2024 17:04:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20the=20wrong=20iterator=20i?= =?UTF-8?q?n=20user=20registration=20details.=20(#4817)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Preslav --- providers/ms365/resources/users.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/providers/ms365/resources/users.go b/providers/ms365/resources/users.go index 6a164c6bd..e7ba145eb 100644 --- a/providers/ms365/resources/users.go +++ b/providers/ms365/resources/users.go @@ -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" @@ -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}