[rt-users] RT created new Requestor instead of the Requestor that I created by REST
Marcelo Calado | TBS TAX Services
mcalado at tbstaxservices.com
Tue Jan 26 15:57:08 EST 2016
Hi There,
I've created new RT users by REST API using this code! Sometimes, I try to
open a new ticket for user and the RT created the new requestor instead of
use the requestor that I created by REST API.
When its happen, the new user/requestor was created with name and email ,
but the another fields is blank.
Have you seem this before? Any idea??? I've created by REST around 2.000 new
users!
$servername="https://myserver.com/REST/1.0/user/new?user=myuser&`pass=passwo
rd"
$content = @'
id: user/new
Name: TestofCreated
EmailAddress: TestOfCreated at gmail.com
RealName: Test of Created
Organization: Calado SMB
Address1: 44,East Dr
City: Brederodes
State: AA
Zip: 01032
Country: BR
MobilePhone: 857-999-9999
'@
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object
TrustAllCertsPolicy
$RT = Invoke-WebRequest -Uri $servername -Body @{content=$content} -Method
Post
$RT.contentrt
Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20160126/260842a4/attachment.htm>
More information about the rt-users
mailing list