diff --git a/src/pkg/services/m365/m365.go b/src/pkg/services/m365/m365.go index b6564ea4d..3e4361bfa 100644 --- a/src/pkg/services/m365/m365.go +++ b/src/pkg/services/m365/m365.go @@ -20,6 +20,20 @@ type User struct { Name string } +// UsersCompat returns a list of users in the specified M365 tenant. +// TODO(ashmrtn): Remove when upstream consumers of the SDK support the fault +// package. +func UsersCompat(ctx context.Context, acct account.Account) ([]*User, error) { + errs := fault.New(true) + + users, err := Users(ctx, acct, errs) + if err != nil { + return nil, err + } + + return users, errs.Err() +} + // Users returns a list of users in the specified M365 tenant // TODO: Implement paging support func Users(ctx context.Context, acct account.Account, errs *fault.Errors) ([]*User, error) {