Skip to content

Reference

ledger.updateUserIdentityProvider

PATCH /v2/users/{user-id}/identity-provider-id — migrate a user between identity providers.

Calls PATCH /v2/users/{userId}/identity-provider-id. Body from UpdateUserIdentityProviderParams excluding userId (sourceIdentityProviderId, targetIdentityProviderId).

Receiver: await canton.ledger.updateUserIdentityProvider

Setup

import { Canton } from '@fairmint/canton-node-sdk';

const canton = new Canton({
  network: 'devnet',
  provider: '5n',
  partyId: 'OWN_PARTY_ID',
});

Minimal example

await canton.ledger.updateUserIdentityProvider({
  userId: 'alice',
  sourceIdentityProviderId: 'default',
  targetIdentityProviderId: 'custom-oidc',
});

Parameters — UpdateUserIdentityProviderParams

Path userId, sourceIdentityProviderId, targetIdentityProviderId.

Returns — UpdateUserIdentityProviderResponse

Updated acknowledgement payload OpenAPI typing.

Auth and party

Admin bearer coordinating Canton ParticipantAdmin / IdentityProviderAdmin semantics deployments expose.

Source

operations/v2/users/update-user-identity-provider.ts