HomeGuidesAPI ReferenceChangelogDiscussions
GuidesiMIS ProfessionaliMIS EnterpriseClient SupportLog In
Discussions

Discussions

Ask a Question
Back to All

Updating username

I'm trying to update just a person's username. I'm trying the request from this page https://developer.imis.com/reference/usersecurity but I keep getting this message: "{"$type":"System.Web.Http.HttpError, System.Web.Http","Message":"Authorization has been denied for this request."}"

Here is my request: var data = {
"$type": "Asi.Soa.Core.DataContracts.GenericExecuteRequest, Asi.Contracts",
"EntityTypeName": "UserSecurity",
"OperationName": "UpdateUserName",
"Parameters": {
"$type": "System.Collections.ObjectModel.Collection1[[System.Object, mscorlib]], mscorlib", "$values": [ "johnb", "[email protected]", "change123", true ] }, "UseJson": false, "ParameterTypeNames": { "$type": "System.Collections.ObjectModel.Collection1[[System.String, mscorlib]], mscorlib",
"$values": [
"System.String",
"System.String",
"System.String",
"System.Boolean"
]
}
};

var xhr = new XMLHttpRequest();

xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});

xhr.open("POST", "https://imistour2647.imiscloud.com/api/UserSecurity/_execute");
xhr.setRequestHeader("content-type", "application/json");

xhr.send(data);

Any help is appreciated. Also, do you need to pass the password through the api for this to work?

Contact us
Copyright © Advanced Solutions International, All rights reserved.