which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)
what are you trying to achieve
what have you tried so far to achieve this
Recently we have implemented SSO . We have tested for 2-3 users from Postman now we want to change it for bulk users.
I am giving you an example below like what do we want to change .
To get the result , I have written created this script -
$URI = ‘URL/api/users/update_identity_provider?login=PLAMSAU7&newExternalProvider=aad&newLogin=walter.green@ll.npa.com’ $PAT = ‘’ $AzureDevOpsAuthenicationHeader = @{Authorization = 'Basic ’ + [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("$($PAT)")) } $response = Invoke-RestMethod -Method Post -Uri $URI -ContentType ‘application/json’ -Body $testsuite_json -Headers $AzureDevOpsAuthenicationHeader return $response
But I am getting this error -
Invoke-RestMethod : The remote server returned an error: (401) Unauthorized. At line:4 char:13 + $response = Invoke-RestMethod -Method Post -Uri $URI -ContentType 'ap … + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand