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: testofcrea...@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!
---------
RT 4.4 and RTIR Training Sessions 
(http://bestpractical.com/services/training.html)
* Hamburg Germany — March 14 & 15, 2016

Reply via email to