We would like to create a logic app that subscribes to a webhook in Microsoft Graph. To enable this subscription you need to include a bearer token. Something the logic app included HTT webhook does not seem to provide. Is there someone who has got this working somehow? We would like to subscribe to the 'calldetailrecords'
One of the workaround is that you can use Subscribe-Header parameter from Add new parameter in order to send the Bearer Token to your Webhook.
Here is the screenshot for your reference
So, I'm passing the Token from my HTTP request connector and adding the same to my Subscribe- Header parameter with Key as "Authentication".
To get the Bearer Token you can follow the steps from Get access on behalf of a user - Microsoft Graph
REFERENCES:
How to pass a Bearer Token using Azure Logic Apps
Related
I am having trouble understanding how to accomplish this. I have Firebase functions running on my application. I am using an external API in which I can configure Webhooks to hit an endpoint on my Firebase functions to perform an action. To make sure that the call comes from this external API, they recommend using an oauth2 flow. Mainly they ask me for:
Provide us (the external API) with an ID and an access token;
these are used to access a URL which provides a bearer token;
this bearer token is then used to access the provided webhook URL until the bearer
token expires after a pre-determined period of time.
And there are 4 input fields:
1. OAuth2 access token url
2. OAuth2 client id
3. OAuth client secret
4. OAuth2 Scope. <---- NOT SURE WHAT THIS ONE MEANS
My question is how do I generate the access token and the client id for this external API?
What value should I put for the oAuth2 scope?
Thanks!
I was able to figure this out using auth0. In one of their documentations, they cleared explained what I was trying to accomplish. Posting here to future reference in case any one needs it.
Thanks all!
reference: https://auth0.com/docs/authorization/flows/client-credentials-flow#learn-more
You can generate the client ID and client secret in the Console > Credentials.
Cloud Functions API oAuth2 scope is https://www.googleapis.com/auth/cloud-platform.
I'm trying to make a call to the Graph API from an Azure Logic App.
I can make a call to the authentication endpoint and get a bearer token.
However, when I use that bearer token to make the call to Graph API, I get the error message:
Access token validation failure. Invalid audience.
I've tried various examples from the MS website and other websites, but none work.
Where am I supposed to specify the audience?
In the first action I have made a HTTPS request to token endpoint with the details as shown below.
Then I parsed the JSON content and picked the access_token and created a new request to call MS Graph as shown below.
Since this is a client credential flow, we will be getting an App token so make sure you have configured Calendars.Read or Calendars.ReadWrite Application permissions and hit https://graph.microsoft.com/v1.0/users/{userid}/events. You should not use /me because there is no user here.
It worked for me.
Instead of using Twilio Auth Token to validate the incoming webhook request from twilo, I want to use API key - API Key Secret combination to validate the request.
I am not being able to find an option in twilio lib
I came across this and saw it was unanswered. Twilio employee here.
This is unfortunately not possible. All outgoing webhooks are signed with the PRIMARY auth token of your account.
As such, it's currently not possible validating these requests using either the secondary token or an API key.
Is Webhook URL necessary for OAuth Access Token?
Prometheus Alertmanager has a place to write a Webhook URL, but is it necessary to write an OAuth Access Token?
What is OAuth Access Token used for?
No. Webhook URLs and OAuth Access Tokens are very different concepts.
Webhook URLs allow you to post a message to a Slack workspace and you only need to know the URL to do that.
OAuth Access Tokens gives you access to use the Slack Web API, which has lot more functionality than just posting messages.
Check out this page on how OAuth works with Slack.
I want to integrate my application with ServiceNow using its REST API. For this, my app needs to get authorized using OAuth 2. I have searched for Authorization and Token endpoints in the wiki of ServiceNow, but could not find any.
Can anyone please post here those urls?
Starting with the Fuji release ServiceNow supports authenticating to REST endpoints using OAuth. First off, be sure to enable the OAuth plugin if it's not already enabled on the ServiceNow instance you are trying to integrate with. For information on how to do this and how to setup an OAuth endpoint check out these product docs.
Setting up OAuth
ServiceNow OAuth with REST
Generating OAuth tokens
Once you've created an OAuth endpoint in the application registry on your ServiceNow instance you'll need to generate tokens to use for authentication. You can find curl samples for generating tokens in the product docs. Review the response to the request you made to generate tokens and grab the 'access token'. The response from generating tokens should contain a JSON body similar to the following:
{"scope":"useraccount","token_type":"Bearer","expires_in":1800,"refresh_token":"w599voG89897rGVDmdp12WA681r9E5948c1CJTPi8g4HGc4NWaz62k6k1K0FMxHW40H8yOO3Hoe","access_token":"F0jh9korTyzd9kaZqZ0SzjKZuS3ut0i4P46Lc52m2JYHiLIcqzFAumpyxshU9mMQ13gJHtxD2fy"}
From the response you will want to record the 'access_token' and include it as a bearer token in subsequent requests to the ServiceNow REST API endpoints.
Sample request to REST Table API using the access token:
curl -H "Accept:application/json" -H "Authorization:Bearer 2wRlsRCT2SYjCCJP91kwo2EFzj5qg4O3I3aC09e0-0hz6Ib3YK7If-LMiNorNuglfqbkL4AfkYC92KYHUCcbpQ" "http://<instance>.service-now.com/api/now/table/incident"
Hope that helps!
It seems ServiceNow supports only password and refresh_token grant types. Please see here. Authorization and Token urls are for Authorization code grant type.