Adding dependants -postman

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Adding dependants -postman

L3 Networker

I am trying to test the api call to add the dependants the example I took is for webfile where I have given the details but still it throws error "Invalid key=value pair (missing equal-sign) in Authorization header (hashed with SHA-256 and encoded with Base64)"

 

1 accepted solution

Accepted Solutions

If you're getting a 400 Bad Request error generated by CloudFront (indicated by the "Generated by cloudfront (CloudFront)" message in the response body), you can follow these checks to resolve the issue.

Go to the Headers tab in Postman and ensure there is no Host header set manually (if there is, remove it) Postman handles the Host header automatically based on the URL you entered. An incorrect manual Host value is probably the cause of CloudFront 400 errors.

Confirm the Content-Type header is set correctly for the API endpoint you are calling.

 

Go to the Body tab in Postman. Select raw and choose JSON from the dropdown menu and ensure your JSON payload is syntactically valid.

 

In the Headers tab, verify the Authorization header. The value should contain only the session token string (do not include the word "Bearer" or "Basic")

 

In Postman's Headers tab, uncheck or delete every other header that is automatically added by Postman (e.g., Cache-Control, Postman-Token).

Only the Content-Type and Authorization headers should remain checked and present in the request.

 

 it would be helpful if you could share (anonymized) the exact URL you are using and the body content of your request.

Let me know!

 

 

 

 

View solution in original post

4 REPLIES 4

L4 Transporter

Hi,

 

You can try to follow these steps:

You must first call the Logon API endpoint to obtain a session token.

use the logon endpoint for your environment (e.g.):

https://<your-tenant>.privilegecloud.cyberark.cloud/PasswordVault/API/Auth/Cyberark/CyberArkAuthenticationService/Logon

 

The response will contain a string. This is your session token. Copy this entire string.

Configure the Authorization Header for Your API Call (e.g., Adding Dependants)

In your request to add dependants, configure the headers exactly as follows:

 

Content-Type = application/json

Authorization = <Your_Session_Token>

 

In Postman's Headers tab, uncheck or delete every other header that is automatically added by Postman. Only the Content-Type and Authorization headers should remain checked and present in the request

 

( just the token -- do not include 'Bearer' or 'Basic')

Hi @Andrea Tepore​ ,

 

I am able to get the logon token, wherein I can retreive details using GET, but the problem is only with POST, not sure if I am missing something, i did as per memntioned on adding dependants api, removing/unchecking everything except content - type and authorisation which is autopopulated. but it throws the below error

 

!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<HTML>

 

<HEAD>

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">

<TITLE>ERROR: The request could not be satisfied</TITLE>

</HEAD>

 

<BODY>

<H1>400 ERROR</H1>

<H2>The request could not be satisfied.</H2>

<HR noshade size="1px">

Bad request.

We can't connect to the server for this app or website at this time. There might be too much traffic or a

configuration error. Try again later, or contact the app or website owner.

<BR clear="all">

If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

<BR clear="all">

<HR noshade size="1px">

<PRE>

Generated by cloudfront (CloudFront)

Request ID: "masked"

</PRE>

<ADDRESS>

</ADDRESS>

</BODY>

 

</HTML>

If you're getting a 400 Bad Request error generated by CloudFront (indicated by the "Generated by cloudfront (CloudFront)" message in the response body), you can follow these checks to resolve the issue.

Go to the Headers tab in Postman and ensure there is no Host header set manually (if there is, remove it) Postman handles the Host header automatically based on the URL you entered. An incorrect manual Host value is probably the cause of CloudFront 400 errors.

Confirm the Content-Type header is set correctly for the API endpoint you are calling.

 

Go to the Body tab in Postman. Select raw and choose JSON from the dropdown menu and ensure your JSON payload is syntactically valid.

 

In the Headers tab, verify the Authorization header. The value should contain only the session token string (do not include the word "Bearer" or "Basic")

 

In Postman's Headers tab, uncheck or delete every other header that is automatically added by Postman (e.g., Cache-Control, Postman-Token).

Only the Content-Type and Authorization headers should remain checked and present in the request.

 

 it would be helpful if you could share (anonymized) the exact URL you are using and the body content of your request.

Let me know!

 

 

 

 

This works thanks!

  • 1 accepted solution
  • 74 Views
  • 4 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!