I'm struggling to access the MS Graph API using the node-red-contrib-graph-oauth-login.
Flow: Inject | node-red-contrib-graph-oauth-login | http request | Debug
I've setup the Azure part and it's working. If I grab the Access token from Graph Explorer | Try Microsoft Graph APIs - Microsoft Graph and past the token in the authorisation as "bearer" auth. Than I can access the data in the node-red function and ultimately store it in MSSQL.
The problem is that after a few hours the token expires.
the node node-red-contrib-graph-oauth-login is also set up correctly. It returns the payload "Application access token still valid, no further action will be taken" and it includes the topics: at:, rt: and bearer: as it should.
But if I use {{msg.payload.bearer}} in the node "http request" and add a Authentication header and {{msg.payload.bearer}}
I get an error:
payload: "{"error":{"code":"InvalidAuthenticationToken","message":"IDX14102: Unable to decode the header '[PII of type 'Microsoft.IdentityModel.Logging.SecurityArtifact' is hidden. For more details, see Microsoft Bing Search]' as Base64Url encoded string.","innerError":{"date":"2024-11-27T11:19:19","request-id":"4f1af0cf-4952-429d-88f0-d5b95db5c7d0","client-request-id":"4f1af0cf-4952-429d-88f0-d5b95db5c7d0"}}}"
who can help me.
Edwin