'Inherit auth from parent' type of Authorization doesn't work while running Collection Runner

Hi,

I have 285 requests in my Postman Collection, in some of them, I use ‘Inherit auth from parent’ type of Authorization.
The tests are failed when the request contains ‘Inherit auth from parent’ type of Authorization and while running Collection Runner. The tests are passed when I run the requests manually. Why does it happen?
The Collection starts from the Authorization request.
The requests which are failed have the following response:
Response Body

  1. Action: “ProfileLookup”

  2. Error: “SystemNotAuthorized”

  3. Description: “You must be signed in to use this functionality”

Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.

Hi Alexandra,

Thanks for flagging this. Can you share what auth method you’re using? Also, what version of the Postman app do you have installed?

Hi John-Paul,

I use ‘Inherit auth from parent’ method of auth. I have installed Version 7.11.0 Postman for Windows.
28

Gotcha, thanks for sharing. What auth method is being inherited? NTLM, Basic, etc.

Ok, Could you share with me where I can check it?
10

Hi Alexandra,

Inherit auth from parent allows a request to inherit it’s authentication method and credentials from either the folder its in, or the Collection itself. Details can be found here:

Based on the error message you provided, it sounds like at least one of your request requires authentication. If needed, you can either specify this authentication directly in the request (the tab in your last screenshot).

Hi John-Paul,

Thanks for your answer, just would like to clarify which type of authentication I should use.
For now, my Collection starts with /Login/ request, auth method (Authorization Tab) - ‘No auth’, after I use the following script to save Bearer Token authorization:
pm.environment.set(“token”, response.Token); to Variables of environment.
After that, I create a new request where I use auth method (Authorization Tab) - ‘Inherit auth form parent’. Maybe to solve this issue the best potion is to use auth method (Authorization Tab) - ‘Bearer Token’?
Actually I use ‘Bearer Token’ {{token}} on the Collection level. So I have no idea how to fix it(

Hi Alexandra,

Got it, thank you for the details.

When you run this Collection in the Runner, are you selecting the correct environment? This may be why it succeeds when sending the requests individually, but fails in the Runner:

Hi John-Paul,

Yes, sure, I choose the particular environment before running the Collection. Take a look at this screenshot, please. I had a different result for requests which use the same auth method. And some requests use the variables, including token from a particular environment and a server returned 200 OK but some didn’t have the same result (400).

Hi Alexandra,

Thank you for the screenshot.

Status 400 generally implies a bad request, meaning there may be something wrong with the way the request is structured. Are these the requests getting the unauthorized message? Status 401 is generally used for “unauthorized”.

Hi John-Paul!

We use 400 Status for “unauthorized”. And probably I need to make an accent that if I send the same request manually, 200OK status comes.

Hmm…that is a bit odd. Would you mind opening a ticket with us so we can take a look at the logs from your app?

https://support.getpostman.com/hc/en-us/requests/new?_ga=2.247510023.1455955528.1574897158-1256997268.1572894639

Ok, I’ve created the request.

1 Like