Lattice - Create Lattice User

Create a user in Lattice using a custom action that makes a request using the SCIM protocol

This guide documents creating a custom action using SCIM protocol to create a user in Lattice. This type of action could be used to enhance your on-boarding process to automate creation of accounts in Lattice. Note that when a user is created in Lattice, they will be in a created state and will still need to be invited by an admin. Additional information on user states in Lattice can be found in this article. Additional information on how to invite a user into Lattice once they have been created via SCIM can be found in this article.

To use this action, you will first have to create an API key in Lattice. Details for creating an API key in Lattice can be found here. The SCIM API in Lattice will need to be enabled, you can find details on how to do that here.

Once you have created the API key in Lattice, it is recommended that you store it in the Torii Secrets Vault and reference it using a variable. Details on how to use the Secrets Vault in Torii can be found here.

Custom Action Configuration

Method : POST

URL : https://api.latticehq.com/scim/v2/Users

Query Parameters

ParameterVariable Mapping

Headers

HeaderValue
Content-Typeapplication/json
Accept/
AuthorizationBearer [SecretsVault.Lattice_API_Key]

Body

{
  "schemas": [
    "urn:ietf:params:scim:schemas:core:2.0:User",
    "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User",
    "urn:ietf:params:scim:schemas:extension:lattice:attributes:1.0:User"
  ],
  "name": {
    "givenName": "[Trigger.User.First-name]",
    "familyName": "[Trigger.User.Last-name]" 
  },
  "userName": "[Trigger.User.Email]", 
  "active": true,
  "emails": [
    {
      "type": "work",
      "value": "[Trigger.User.Email]"
    }
  ],
  "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
    "department": "[Trigger.User.Details.Google-Workspace-Department]"
  }
}