I am using Azure Blockchain workbench. One smart contract is deployed on Azure Blockchain workbench. I can do everything from workbench front end. But I want to integrate Azure Blockchain workbench backend ( API part ) with Azure logic apps. In Azure Blockchain workbench backend ( API ) there is POST api to enter data into smart contract. I want to invoke that API endpoint from Azure logic App. My logic app is like when a row is added to MSSQL database table it will trigger an action which will invoke POST api of Azure Blockchain workbench. Backend of Azure blockchain workbench is secured with Azure AD oauth. Currently, I am passing raw Bearer token in Azure logic apps by copying it from Inspect elements of browser. And it is working fine with that. But I want to make token dynamic because every time when token expires I have to copy and paste it again from browser to Azure logic app to make it work. I have confusion with Azure AD oauth. How to authenticate particular in Azure AD oauth and make API request with that user's auth token ? If that is not possible with logic app how to generate auth token of particular user ? ( user I want to authenticate is registered in my Azure AD )
Forum Discussion
hansrajrami
Mar 10, 2020Copper Contributor
invoke azure blockchain workbench rest api from azure logic app with oauth
0
- asifwaquarCopper Contributor
Hi hansrajrami ,
In logic app you will be able to get http request and also can generate token from request ,please refer url .https://docs.microsoft.com/en-us/azure/logic-apps/logic-apps-securing-a-logic-app
To insert data into SQL or Mysql database you may use ethereum smart contract connector to execute any function and after getting response trigger action to save data into SQL database . please refer below link may be helpful.
http://asifwaquar.com/publish-logic-apps-and-flow-data-to-sql-database-in-azure-blockchain-service/
thank you
Asif