Using SDK PureCloud Platform.Client.V2 version 252.1.0, I am encountering an issue with the PatchUser method. This application has been successful in adding users, stations, roles, etc. including updating the user's extension. It seems somewhere around the end of 2025, it stopped working for extensions and does not generate errors. The same function works as expected when run on the developer web page. In writing this, I found that the same thing is true for the EmployerInfo entries. The source code is at the bottom.
*****This Body object submitted is
class UpdateUser {
Id:
Name:
Chat:
Department: Access Nurse
Email:
PrimaryContactInfo:
Addresses: System.Collections.Generic.List`1[PureCloudPlatform.Client.V2.Model.Contact]
Title: Patient Coordinator
Username:
PreferredName:
Manager: d66c15b9-f30a-4ad3-b0d5-c038efd2390d
Images:
Version: 17
ProfileSkills:
Locations:
Groups:
State: Active
AcdAutoAnswer: False
Certifications:
Biography:
EmployerInfo: class EmployerInfo {
OfficialName:
EmployeeId: pludog
EmployeeType:
DateHire:
}
SelfUri:
}
*****This body.Addresses.count submitted is
1
*****This body.Addresses[0].Extension submitted is
6977
*****The result object is
class User {
Id: 9cb12a9a-fdc4-4196-88f7-328f565e0322
Name: Pluto Dog
Division: class Division {
Id: 299b68dc-f47e-410a-a3ea-4f043010116a
Name: Access Nurse
SelfUri: /api/v2/authorization/divisions/299b68dc-f47e-410a-a3ea-4f043010116a
}
Chat: class Chat {
JabberId: 6960198c875c752c9220a127@teamhealthinc.orgspan.com
}
Department: Access Nurse
Email: pluto_dog@teamhealth.com
PrimaryContactInfo: System.Collections.Generic.List`1[PureCloudPlatform.Client.V2.Model.Contact]
Addresses: System.Collections.Generic.List`1[PureCloudPlatform.Client.V2.Model.Contact]
State: Active
Title: Patient Coordinator
Username: pluto_dog@teamhealth.com
Manager: class User {
Id: d66c15b9-f30a-4ad3-b0d5-c038efd2390d
Name:
Division:
Chat:
Department:
Email:
PrimaryContactInfo:
Addresses:
State:
Title:
Username:
Manager:
Images:
Version:
Certifications:
Biography:
EmployerInfo:
PreferredName:
RoutingStatus:
Presence:
IntegrationPresence:
ConversationSummary:
OutOfOffice:
Geolocation:
Station:
Authorization:
ProfileSkills:
Locations:
Groups:
Team:
WorkPlanBidRanks:
Skills:
Languages:
AcdAutoAnswer:
LanguagePreference:
LastTokenIssued:
DateLastLogin:
DateWelcomeSent:
SelfUri: /api/v2/users/d66c15b9-f30a-4ad3-b0d5-c038efd2390d
}
Images:
Version: 18
Certifications:
Biography:
EmployerInfo:
PreferredName:
RoutingStatus:
Presence:
IntegrationPresence:
ConversationSummary:
OutOfOffice:
Geolocation:
Station:
Authorization:
ProfileSkills:
Locations:
Groups:
Team:
WorkPlanBidRanks:
Skills:
Languages:
AcdAutoAnswer: False
LanguagePreference:
LastTokenIssued:
DateLastLogin:
DateWelcomeSent:
SelfUri: /api/v2/users/9cb12a9a-fdc4-4196-88f7-328f565e0322
}
*****The result.Addresses.Count array is
0
---------------------------
public bool UpdateUserDetails(string userid, string department, string extension, string DID, string reportsTo, string skills, bool autoAnswer, string ADuserId, Int32 userVersion)
{
PureCloudRegionHosts region = PureCloudRegionHosts.us_east_1; // Genesys Cloud region
Configuration.Default.ApiClient.setBasePath(region);
var accessTokenInfo = PureCloudPlatform.Client.V2.Client.Configuration.Default.AuthTokenInfo.AccessToken = getGenesysTokenStringClientCredentials();
if (uc.Find(u => u.UserId == userid).userState == "deleted")
{
UpdateUsersDivision(userid);
}
var apiInstance = new UsersApi();
var userId = userid;
var body = new UpdateUser();
body.State = UpdateUser.StateEnum.Active;
body.Department = department;
body.Title = Title.Text;
var addr = new List<Contact>();
var contact = new Contact() { Extension = extension, Type = Contact.TypeEnum.Work, MediaType = Contact.MediaTypeEnum.Phone, CountryCode = "US", Integration = "" };
addr.Add(contact);
if (DID.Length > 0)
{
contact = new Contact() { Extension = "", Address = DID, Type = Contact.TypeEnum.Work2, MediaType = Contact.MediaTypeEnum.Phone };
addr.Add(contact);
}
body.Addresses = addr;
body.Manager = reportsTo;
body.AcdAutoAnswer = autoAnswer;
EmployerInfo eInfo = new EmployerInfo() { EmployeeId = ADuserId };
body.EmployerInfo = eInfo;
MessageBox.Show($"Employee ID set to {ADuserId}");
body.Version = userVersion;
addStatusMessage($"*****This Body object submitted is {NL}" + body.ToString());
addStatusMessage($"*****This body.Addresses.count submitted is {NL}" + body.Addresses.Count.ToString());
addStatusMessage($"*****This body.Addresses[0].Extension submitted is {NL}" + body.Addresses[0].Extension.ToString());
try
{
var result = apiInstance.PatchUser(userId, body);
Debug.WriteLine(result);
addStatusMessage($"*****The result object is {NL}" + result.ToString());
addStatusMessage($"*****The result.Addresses.Count array is {NL}" + result.Addresses.Count.ToString());
}
catch (Exception e)
{
addStatusMessage("Exception when calling Users.PatchUser: " + e.Message);
}
return true;
}
#API/Integrations------------------------------
Albert Smith
Software Engineer
------------------------------