Fix Microsoft 365 SCIM bridge connection and scope

Add the missing MICROSOFT_365 value to the connector_provider enum
so the connector loader stops failing with SQLSTATE 22P02.

Scope each Identity Provider card to its own SCIMBridge type so
connecting Microsoft 365 no longer marks Google Workspace as
connected (and vice versa).

Filter Microsoft Graph /users to userType eq 'Member' so the bridge
only syncs home-tenant members and skips B2B guest accounts that
were polluting the synced People list.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-05-07 15:11:23 +02:00
committed by Émile Ré
parent d1f34add6f
commit cf53ca3a0d
4 changed files with 49 additions and 12 deletions

View File

@@ -40,6 +40,7 @@ const googleWorkspaceConnectorFragment = graphql`
id
bridge {
id
type
excludedUserNames
connector {
id
@@ -78,7 +79,7 @@ export function GoogleWorkspaceConnector(props: {
}) {
const { fKey, oauth2Scopes } = props;
const data = useFragment<GoogleWorkspaceConnectorFragment$key>(googleWorkspaceConnectorFragment, fKey);
const bridge = data?.bridge;
const bridge = data?.bridge?.type === "GOOGLE_WORKSPACE" ? data.bridge : null;
const connector = bridge?.connector;
const scimConfigurationId = data?.id;
const bridgeId = bridge?.id;

View File

@@ -40,6 +40,7 @@ const microsoft365ConnectorFragment = graphql`
id
bridge {
id
type
excludedUserNames
connector {
id
@@ -78,7 +79,7 @@ export function Microsoft365Connector(props: {
}) {
const { fKey, oauth2Scopes } = props;
const data = useFragment<Microsoft365ConnectorFragment$key>(microsoft365ConnectorFragment, fKey);
const bridge = data?.bridge;
const bridge = data?.bridge?.type === "MICROSOFT_365" ? data.bridge : null;
const connector = bridge?.connector;
const scimConfigurationId = data?.id;
const bridgeId = bridge?.id;