Inherit from parent not working

Iā€™ve made a collection and added the oath2.0 authorization, this works.

Iā€™ve added a request and set the authorization to inherit from the parent, but when I run the request I get the error:

{
ā€œerrorā€: {
ā€œcodeā€: ā€œInvalidAuthenticationTokenā€,
ā€œmessageā€: ā€œAccess token is empty.ā€,
ā€œinnerErrorā€: {
ā€œdateā€: ā€œ2023-04-07T09:26:22ā€,
ā€œrequest-idā€: ā€œf1030c0e-8282-44f5-ac4f-3acc65d4146dā€,
ā€œclient-request-idā€: ā€œf1030c0e-8282-44f5-ac4f-3acc65d4146dā€
}
}
}

When I change the authorization to ā€œBearer tokenā€ and copy paste the token from the collection, the request works.

What am I missing?

The request is a simple MS Graph request: https://graph.microsoft.com/v1.0/me

This is the authorization on collection level:

And the structure:

image

Hi @Philippe

Is it possible to share a screenshot of how you have configured your auth (changing sensitive values to xxxxx or something like that) ā€¦ and also of the collection / folder structure you are using?

Sure, Iā€™ve added it to my original post.

At the top of your screenshot, above where it says ā€œtoken expiredā€, are there are ā€œavailableā€ tokens?

Itā€™s been a little while since I played with this, but if there are no available tokens, I think you have to refresh the token at the top, then once a token exists it should auto-refresh when you send requests.

(I think)

It said expired because I left it for a while, even when I press refresh and use token, the request still gives me the same error message.

In the headers tab of the ā€˜mailFoldersā€™ API call, do you see the token being passed in the header?

It should be greyed out as it would be an auto-generated header, but you should see the key/value pair.

This might helpā€¦ (Auth is 2 minutes in)

This is what I see in the headers:

I do see the token in the params:

The video didnā€™t help.

Found the solution, ā€œAdd auth data toā€ was set to ā€œRequest URLā€

image

Once I changed it to ā€œRequest headersā€ it works like a charm.

@w4dd325 Thanks for the help!

Glad you resolved your issue :+1: