SyncUser
UserKey userObj = new UserKey(user.id, user.first_name, user.last_name, user.email);
permit.Api.SyncUser(userObj);
// SyncUser returns the synced with UserKey type
// {
// "customId": string,
// "email": string,
// "firstName": string,
// "lastName": string,
// "attributes": Dictionary<string, string>,
// }
This function is used to sync (save) a user's information to the Permit.io cloud (and PDP) upon user creation.
note
The function should be used for the initial creation of the user. Once the user has been synced with Permit, you should not use this API call anymore to update the user's role.
Instead use: Assign role SDK function to update user roles. You can use the Permit web application user management or policy editor to update user data. You can also use the rest API.