sym.sdk.utils.user

Functions

persist_user_identity(*, email, service, ...)

This function will create or update a UserIdentity for a User identified by the provided email.

sym.sdk.utils.user.persist_user_identity(*, email: str, service: str, service_id: str, user_id: str) sym.sdk.user.UserIdentity

This function will create or update a UserIdentity for a User identified by the provided email.

If no User matching the provided email exists, one will be created.

Parameters
  • email – The email of the Sym User to persist a UserIdentity for.

  • service – The name of the external system providing the identity (e.g. “slack”).

  • service_id – The ID of the external system providing the identity (e.g. “T123ABC”) for a Slack Workspace.

  • user_id – The User’s identifier in the external system (e.g. U12345 for a Slack User ID).

Returns

The UserIdentity that was created or updated.

Raises

CouldNotSaveError – if the identity failed to save for any reason.