Forum Discussion
Since I have a need to run my pipeline as a scheduled task it’s not feasible to use the SnapLogic REST OAuth2 Account and manually/periodically click on ‘authorize’ to get a new access token. If there’s a way to automate the periodic authorization in such a way that makes the new access token available to pipelines that want to use it please let me know.
In lieu of that workaround/solution we’re adding a REST Post snap to explicitly make the authorization request and get the access token as part of the pipeline. The drawbacks that I can see are that the client id, secret, and access token are not secure like they would be in the REST OAuth2 Account. Also, if we have more than one pipeline running at a time that make an authorization request using the same client ID, it’s possible that one pipeline may make an authorization request that causes the access token of another pipeline to become invalid.
- mramaswamy5 years agoNew Contributor II
I am working on a similar app where I am not getting the Refresh Token. Will you be able to share the REST Post snap you are using for the authorization request?
- PSAmmirata5 years agoEmployee
Hi Murugan - I’m sorry, but my company’s policies prevent me from sharing the pipeline.
- mramaswamy5 years agoNew Contributor II
Thanks for the reply. I understand. I have created my own REST POST to get the authorization token. It is not working.
URL - https://login.microsoftonline.com/{{TenantID}}/oauth2/token
grant_type - ‘client_credendials’I have client_id and client_secret. I am able to get the Bearer token from POSTMAN by giving this information in Body. I would like to know how to give this information in REST GET or REST POST snap.
Thanks,
Murugan