question

WorkatoTest-6136 avatar image
0 Votes"
WorkatoTest-6136 asked ShivaniRai-MSFT-7217 answered

Deleting Outlook Calendar Event In Workato

I'm using a platform called Workato to manage some Outlook Calendar automations. The platform has calls like "new event" and "update event" built in, but if I want to delete an event I need to use a custom action. I'm using this endpoint to delete an event:

https://graph.microsoft.com/v1.0/me/events/{id}

When I make this call, I get this error:

401 Unauthorized: {"error":{"code":"InvalidAuthenticationToken","message":"Access token validation failure. Invalid audience.","innerError":{"date":"2021-09-16T05:12:44","request-id":"a042604a-2cff-45b0-a857-95a2558eb763","client-request-id":"a042604a-2cff-45b0-a857-95a2558eb763"}}}

Workato is managing my authorization via an in-app connector. The app has Calendar.readwrite persmissions. Am I making the wrong call? What do I need to do to get proper permissions? Any help would be appreciated, thanks.

microsoft-graph-calendar
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ShivaniRai-MSFT-7217 avatar image
0 Votes"
ShivaniRai-MSFT-7217 answered

Hi @WorkatoTest-6136 ,

As per the error message you have an invalid audience present in your access token. This error occurs when the access token is acquired for a given resource/API (which is MS graph in your case) but being consumed by different resource/API. You can check the audience by decoding access token using this https://jwt.io
To call MS Graph APIs, audience must be set to https://graph.microsoft.com in access token.
You can refer this similar MS Q&A post for more clarity https://docs.microsoft.com/en-us/answers/questions/513098/error-calling-user-invitation-api-httpsgraphmicros.html

Hope this helps.

If the answer is helpful, please click Accept Answer and kindly upvote it. If you have any further questions about this answer, please click Comment.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.