In the DocuSign Admin API updateUsers request (s. link), the site_ID field is a mandatory field. Unfortunately, I couldn't find any documentation on this field anywhere. Can someone answer the meaning of the field and what values it can take?
in developer env you always put "1" in production:
The following code worked for me and it seems to be a more fool-proof way than hard-coded constants to get the SiteId, whatever it may be:
// fetch user's full profile info by email as an example
// only GetUserProfiles will return SiteId required by UpdateUser;
// GetUsers does not return SiteId
var getUsersOptions = new UsersApi.GetUserProfilesOptions
{
email = person.LoginEmail.ToLower()
};
var users = await usersApi.GetUserProfilesAsync(options.OrganizationId, getUsersOptions);
if (users.Users.Count == 0)
{
return false;
}
var user = users.Users.Single();
var request = new UpdateUsersRequest
{
Users = new List<UpdateUserRequest> {
new UpdateUserRequest {
// mandatory fields
Id = user.Id,
SiteId = user.SiteId,
// all the updated values follow
// a caveat - it does not have a phone number, you have to use bulk APIs to update that :(
And yeah, it required some serious digging into the nuget SDK to find out because DocuSign documentation is pretty inconsistent at times (UserTitle is being used as job title, APIUserName is actually storing user's ID etc.).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.