I’ve been trying to set up a data connection to REST API to use in a webhook (send automated email on outlook upon action completion). When testing the webhook, I am getting error access denied.
I have tried using data connection authentication “Bearer Token” and “API key”, OAuth 2.0 is unavailable. Unsure if this is causing the error.
I have set up an egress policy for graph.microsoft.com (Port 443) which I have understood as the most suitable approach for sending emails to outlook. This has been approved.
Do you have any recommendations on how to resolve the error?
I think I have exactly the setup you’re looking for. I have also set up a Rest API connection / Webhook for connecting to MS Exchange / Graph API and sending emails.
The tricky part here is that you need to get an AuthToken first from login.microsoftonline.com to get a token you can use at graph.microsoft.com
The way to make this work is to specify two different domains in your connection settings, both of which have Authentication set to None. You will want to specify your credentials (probably tenantId, clientId and clientSecret) that you will use to authenticate against login.microsoftonline.com as additional secrets. See screenshot below: