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:
Sacha Al Himdani
2026-07-31 15:32:49 +02:00
parent e8e5e9bf9d
commit d8c284399b
3 changed files with 125 additions and 5 deletions

View File

@@ -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)