Rest API with Windows Logon

Rest API with Windows Logon

131
Created On 11/10/26 10:56 AM - Last Modified 11/10/26 16:06 PM


Symptom


How to perform Rest API using windows logon



Environment


11.6;11.7;12.0 Cyber-Ark API/SDK REST API

Resolution


The following powershell script is the example of using Rest API windows logon. This script will return the token if windows logon is valid/succesful.

 

$baseUrl = "<PVWA URL>"

$body = (ConvertTo-Json $person)

 

$newLogonUrl = $baseUrl +"API/auth/Windows/Logon"

$newLogonToken = Invoke-RestMethod -Uri $newLogonUrl -Method Post -ContentType 'application/json' -usedefaultcredentials

 

$newLogontoken

NOTE: Please make sure Windows Logon on PVWA v10 is working before running the script.



Actions
  • Print
  • Copy Link

    https://knowledgebase.paloaltonetworks.com/KCSArticleDetail?id=kA1hj0000001OJdCAM&lang=en_US&refURL=http%3A%2F%2Fknowledgebase.paloaltonetworks.com%2FKCSArticleDetail