Public/Invoke-AllegisIDNManualCorrelation.ps1
1 2 3 4 5 6 7 8 9 10 11 12 |
function Invoke-AllegisIDNManualCorrelation ([string]$accesstoken,[string]$orgName,[string]$sourceid,[PSCustomObject[]]$csv){ $header=@{'Authorization'="Bearer $accesstoken"; 'Content-Type'='multipart/form-data; boundary=---------------------------127172444920395'} $body='-----------------------------127172444920395 Content-Disposition: form-data; name="file"; filename="test.csv" Content-Type: application/vnd.ms-excel ' + ($csv.replace('"','') | out-string) + '-----------------------------127172444920395--' #$body $privateuril=$privateuri="https://$($orgName).identitynow.com" Invoke-WebRequest -body $body -Method post -Uri "$($privateuri)/cc/api/source/loadUncorrelatedAccounts/$($sourceid)" -Headers $header -UseBasicParsing } |