Philippe
(Philippe)
April 7, 2023, 9:28am
1
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:
w4dd325
(w4dd325)
April 7, 2023, 11:30am
2
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?
Philippe
(Philippe)
April 7, 2023, 11:38am
4
Sure, Iāve added it to my original post.
w4dd325
(w4dd325)
April 7, 2023, 12:06pm
5
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)
Philippe
(Philippe)
April 7, 2023, 12:47pm
7
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.
w4dd325
(w4dd325)
April 7, 2023, 12:49pm
8
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.
w4dd325
(w4dd325)
April 7, 2023, 12:54pm
9
This might help⦠(Auth is 2 minutes in)
Philippe
(Philippe)
April 7, 2023, 12:56pm
10
This is what I see in the headers:
I do see the token in the params:
The video didnāt help.
Philippe
(Philippe)
April 7, 2023, 1:44pm
11
Found the solution, āAdd auth data toā was set to āRequest URLā
Once I changed it to āRequest headersā it works like a charm.
@w4dd325 Thanks for the help!
w4dd325
(w4dd325)
April 7, 2023, 2:27pm
12
Glad you resolved your issue