Pratham Khodwe
08/06/2025, 6:28 PMAsk Inkeep
08/06/2025, 6:28 PMPermit Support Automation
08/06/2025, 6:28 PMAsk Inkeep
08/06/2025, 6:28 PMuserData := models.UserCreate{
Key: "user|123456789",
Email: "<mailto:john@smith.com|john@smith.com>",
FirstName: "John",
LastName: "Smith",
RoleAssignments: []models.RoleAssignmentCreate{
{
Role: "Manager",
Tenant: "abc", // Your tenant key
},
},
}
Option 2: Create user first, then assign role
First create the user:
user := enforcement.UserBuilder("<mailto:john@doe.com|john@doe.com>") .Build()
(2)
Then assign them to the tenant with a role using the API. The role assignment is what creates the tenant association. (1)
Important Note
The documentation shows that users appear in the Directory under "All Tenants" when first creatAsk Inkeep
08/06/2025, 6:28 PMNatalia Edelson
08/06/2025, 6:35 PM