Skip to main content
Version: 2.0.0


Assign a resource role to a specific user.


ctx - The context of the request.
userKey - The key of the user to assign the role to.
roleKey - The key of the role to assign to the user.
tenantKey - The key of the user's tenant.
resourceInstance - The resource instance to assign the role with (e.g. "document:mydoc") .


    resourceRoleAssignment, err := Permit.Api.Users.AssignResourceRole(ctx, "user-key", "role-key", "tenant-key", "document:doc1")