SCIM configuration for a connection — inbound user provisioning.
An external identity provider pushes users into Auth0 over SCIM 2.0, authenticating
with a token issued by create_token/2. For the other direction — Auth0 pulling users
and groups out of a directory — see Auth0Client.Management.Connection.DirectoryProvisioning.
Every function except all/1 takes a connection id, not a SCIM-configuration id.
A connection has at most one SCIM configuration, so there is nothing else to address
it by.
Summary
Functions
Gets every SCIM configuration in the tenant
Creates a SCIM configuration for a connection
Creates a SCIM token for a connection
Gets the default SCIM mapping for a connection
Deletes a connection's SCIM configuration
Deletes a SCIM token
Gets a connection's SCIM configuration
Gets the SCIM tokens for a connection
Updates a connection's SCIM configuration
Functions
Gets every SCIM configuration in the tenant
Uses checkpoint pagination: omit from on the first call, then pass the next value
from the response.
iex> Auth0Client.Management.Connection.Scim.all()
iex> Auth0Client.Management.Connection.Scim.all(take: 50)
Creates a SCIM configuration for a connection
user_id_attribute names the SCIM field to derive unique user ids from. mapping
is a list of %{auth0: _, scim: _} pairs; omit both to accept the defaults, which
default_mapping/1 reports.
iex> Auth0Client.Management.Connection.Scim.create("some_conn_id")
iex> Auth0Client.Management.Connection.Scim.create("some_conn_id", %{
...> user_id_attribute: "externalId",
...> mapping: [%{auth0: "email", scim: "userName"}]
...> })
Creates a SCIM token for a connection
token_lifetime is in seconds and must be greater than 900. The token value is
returned once, here — Auth0 will not show it again, so store it when you create it.
iex> Auth0Client.Management.Connection.Scim.create_token("some_conn_id", %{
...> scopes: ["get:users", "post:users"],
...> token_lifetime: 86_400
...> })
Gets the default SCIM mapping for a connection
What Auth0 uses when create/2 is called without a mapping — useful as the
starting point for a custom one.
iex> Auth0Client.Management.Connection.Scim.default_mapping("some_conn_id")
Deletes a connection's SCIM configuration
iex> Auth0Client.Management.Connection.Scim.delete("some_conn_id")
Deletes a SCIM token
iex> Auth0Client.Management.Connection.Scim.delete_token("some_conn_id", "some_token_id")
Gets a connection's SCIM configuration
iex> Auth0Client.Management.Connection.Scim.get("some_conn_id")
Gets the SCIM tokens for a connection
The token values themselves are returned only by create_token/2.
iex> Auth0Client.Management.Connection.Scim.tokens("some_conn_id")
Updates a connection's SCIM configuration
A PATCH, but Auth0 requires both user_id_attribute and mapping — send the
whole configuration, not the part you are changing.
iex> Auth0Client.Management.Connection.Scim.update("some_conn_id", %{
...> user_id_attribute: "externalId",
...> mapping: [%{auth0: "email", scim: "userName"}]
...> })