sym.sdk.utils.user¶
Functions
|
This function will create or update a |
- 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 aUser
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 aUserIdentity
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.