I’m using Nintex for Sharepoint 2019 on prem and I’m trying to send a POST request to Graph API to send an email.
The flow is as follows:
A GET request to Graph with ClientID and SecretID to get a token back. This part is working fine.
Then you’re supposed to send the token as the Authentication header when sending the next GET/POST request depending on what you want to do. In my case, I’m sending a POST request to the /sendMail endpoint.
I know the token I’m getting is good because I can successfully make the POST request via Postman and I get a 202 response and the email sends out. But whenever I try to replicate the same exact request from the workflow, I get the following error:
code":"InvalidAuthenticationToken","message":"CompactToken parsing failed with error code: 80049244
This usually means the format of the token is wrong, or that the token is not the correct one for what the request is asking (but I already know this is not the case since it works via Postman).
The header is supposed to be: Authorization: Bearer {token}. (With a space between bearer and token). So in my workflow I’m setting up a Web Call with a header set up as:
Name “Authorization” and the value being “Bearer {token}” No typos, as far as I can tell.
The token is around 1600 characters, so I’m starting to think I might be hitting a the max character count on the header length and it’s being truncated when sent out. Unfortunately I don’t have a way of checking what Nintex is actually sending out since I can’t sniff the request and I don’t have a custom endpoint I could use to read that.
Any thoughts? Has anyone ran into anything like this?
Thanks