Building Native OAuth2.0 based Flow Integration with Azure Databricks
Power Apps is cool. Recently we were working on scenario where I needed to execute some API Action on Azure Databricks from PowerApp portal using Flow. Then, we came across that it can be executed multiple ways. But we wanted to have native Auth integration and use it alongside Flow to execute the job.
In this post, I tried to capture steps to build OAuth2.0 based integration between Power App + Flow + Azure Databricks + Azure AD, such that connector from Flow can easily authentication and perform job and return output to/from Azure Databricks.
Note: Same approach (almost 99.9% same steps) can be repeated if you are using Azure Logic App for building any Business Integration Solution with Azure Databricks
Scenario:
- End User to System: There is front end portal which can be accessed by authenticated/authorized users from Azure AD (AAD). This portal has one interface which is nothing but some function or code button <behind the scenes code/ or javascript/ let’s assume>. User interact with this function by trigger this function by feeding information or it can be static function without input (use case be anything).
- Portal to Power Apps Flow: Once function trigger, it triggers Microsoft Power Apps Flow behind the scene (Logic App equivalent in Azure, based upon http request). Gone are those days, where we need to club everything together. Using Power Apps Flow/Azure Logic App, application process can easily be de-coupled.
- Power Apps Flow to Azure Databricks (ADB): Now comes the interesting part, ADB can be non-interactively consumed from using many ways. In this repo, we shall see how Natively Power Apps Flow can talk to ADB and seamless perform OAuth token exchange for query execution on its (while request coming from Flow by End User vis Some Interface i.e. GUI).
- Solution:
I have documented end to end solution process in my GitHub here. Open for feedback and suggestions.