Forum Discussion
DanLocks
2 years agoQrew Trainee
For posterity:
There is currently a bug in the webhook oauth2 authentication. it won't work if you need to provide a scope.
I ended up building a pipeline That authenticates itself. It's rather a hack, but.. it works. like this:
- trigger on new outlook email in shared mailbox, filter: subject starts with "new time proposed"
- fetch JSON from the MS oauth2 authentication service (https://login.microsoftonline.com/{tenantID}/oauth2/v2.0/token) to get a token (grant_type=client_credentials , scope=https://graph.microsoft.com/.default)
- use the token in another fetch JSON to https://graph.microsoft.com/v1.0/users/{shared_mailbox_from_step_1}/messages/{{a.id}}
- Process the json to get the proposedNewTime values.
Functional, but kinda ugly.
------------------------------
Dan Locks
------------------------------