'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

Hi There, is this problem resolved? I am facing the same issue. I have a collection, multiple folders in the collection and multiple APIs in each of the folders. I have set authorisation type to oAuth2.0 at the collection level and I wanted that to cascade down to folders and APIs within the folders.

The “Inherit auth from parent” at the folder and the API level is not working. I am on the latest version which is Postman v8.6.1 version.

Can you please help?

Cheers,
-Kiran.

3 Likes

Hi k.v.kirankumar,

did you solve the issue of cascading oAuth2 in multiple folders? I’m facing the same issue.

Thanks,
Carola

1 Like

Did you save the changes in the Collection? the UI is not very good and that stepcan be missed

8 Likes

For me, it all comes down to this: the token variable did not save in the collection level, therefore it did not affect the api request inherit from it ! Thx!

Aha! Thank you! I had totally missed the Save button when adding Authorisation to a folder.

There is not enough difference in the grey for “active” and “disabled” on the Save button for my eyes…

1 Like

Wow… this saved my day! Saving the collection was the solution for me. Thanks!

Just adding here as the solution to a few people’s problems were around saving.

We now have an Autosave option in the Settings Menu. :tada: This is currently in Beta and will only your Requests and Collections.