Skip to main content

User Storage Provider API

UserStorageProviderHandle wraps the operational endpoints for an existing user storage provider such as LDAP.

Access

const provider = realm.userStorageProvider('provider-id');

Methods

getName()

Fetches the provider id/name pair and caches the name on the handle.

removeImportedUsers()

Removes imported users for the provider.

sync(action?)

Triggers a provider sync.

await provider.sync('triggerFullSync');
await provider.sync('triggerChangedUsersSync');

Supported actions:

  • triggerFullSync
  • triggerChangedUsersSync

unlinkUsers()

Unlinks imported users from the provider.

syncMappers(parentId, direction?)

Triggers mapper sync operations.

await provider.syncMappers('mapper-parent-id', 'fedToKeycloak');

Supported directions:

  • fedToKeycloak
  • keycloakToFed