Soft-fail Microsoft 365 MFA when registration fetch fails
AuditLog.Read.All is not available on every tenant. Keep importing accounts with MFA unknown and log the error instead of failing the whole source fetch. Signed-off-by: Sacha Al Himdani <sacha@probo.com>
This commit is contained in:
@@ -48,8 +48,8 @@ func microsoft365Registration() *Registration {
|
||||
"https://graph.microsoft.com/Directory.Read.All",
|
||||
"https://graph.microsoft.com/RoleManagement.Read.Directory",
|
||||
},
|
||||
NewDriver: func(_ context.Context, c *http.Client, _ *coredata.Connector, _ *log.Logger) (drivers.Driver, error) {
|
||||
return drivers.NewMicrosoft365Driver(c), nil
|
||||
NewDriver: func(_ context.Context, c *http.Client, _ *coredata.Connector, logger *log.Logger) (drivers.Driver, error) {
|
||||
return drivers.NewMicrosoft365Driver(c, logger.Named("microsoft365")), nil
|
||||
},
|
||||
NewNameResolver: func(_ context.Context, c *http.Client, _ *coredata.Connector, _ *log.Logger) drivers.NameResolver {
|
||||
return drivers.NewMicrosoft365NameResolver(c)
|
||||
|
||||
Reference in New Issue
Block a user