Deleting Outlook Calendar Event In Workato

Workato Test 1 Reputation point

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:{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 API
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShivaniRai-MSFT 2,686 Reputation points

    Hi @Workato Test ,

    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
    To call MS Graph APIs, audience must be set to in access token.
    You can refer this similar MS Q&A post for more clarity

    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.

    0 comments No comments