Click HERE to see how Saviynt Intelligence is transforming the industry. |
08/22/2024 02:27 PM - edited 08/22/2024 02:28 PM
Hello,
We are working on integration with Prisma Cloud to manage Prisma account provisioning.
Its login API is a POST Form request with form fields of username and password, then it return a JWT token. Other API Calls will have to use the JWT Token in a specific custom Header such as:
x-token : jwtToken
Can you share a ConnectionJSON to get a JWT Token and use this token for CreateAccontJSON?
Thanks,
Solved! Go to Solution.
08/22/2024 03:51 PM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
refer json samples
https://docs.saviyntcloud.com/bundle/Dev-Handbook-REST-v24x/page/Content/Developers-Handbook.htm
08/22/2024 06:40 PM
Here is the screenshot for login and get the token from response. I am not sure what authType from Saviynt perspective: the body is JSON with username and password, the response contains token
08/22/2024 07:25 PM
You can use oauth2
{
"authentications": {
"userAuth": {
"authType": "oauth2",
"url": "https://<domain name>/login",
"httpMethod": "POST",
"httpParams": {
"username": "<Username>",
"password": "<Password>"
},
"httpHeaders": {
"contentType": "application/x-www-form-urlencoded"
},
"httpContentType": "application/x-www-form-urlencoded",
"expiryError": "ExpiredAuthenticationToken",
"authError": [
"InvalidAuthenticationToken",
"AuthenticationFailed",
"FAILURE",
"INVALID_SESSION_ID"
],
"timeOutError": "Read timed out",
"errorPath": "errors.type",
"maxRefreshTryCount": 5,
"tokenResponsePath": "token",
"tokenType": "Bearer",
"accessToken": "<access token>"
}
}
}
08/22/2024 10:12 PM
Along with the JSON shared below, add your token to the header
"httpHeaders": {
"x-token" : "jwtToken",
"contentType": "application/x-www-form-urlencoded"
},