Azure, Open Source and ...

Azure Functions and Logic Apps better together!

Here at MTC we are all about showcasing Microsoft technologies by implementing them first for our internal use and later on share the lessons learned and the artifacts with our customers as part of our design sessions and also through our GitHub team.

Back in last June as part of our Hack week I came up with an idea to use our cognitive services and BOT framework to implement a custom bot to streamline and modernize our engagement request solution currently running on Azure and a web app. BOT framework has allowed us to let our requester send their request faster on a device of their choice and use apps like Microsoft Teams or Skype faster and on the go!

pic-1-1 capture


As you can see below the majority of solution we designed and implemented running on Azure PaaS offerings including Logic Apps, Web Apps, Document DB and Azure SQL to name a few:


As we are marching through completion of phase one and getting ready to deploy to production we had to resolve one missing piece and that was validating certain information back from our Dynamics 365 by sending custom queries and getting the results from our instance of Logic Apps! While building a custom API App was an option we decided to use the new kid in town! Introducing Azure Functions! our serverless code architecture.

Implementing that piece of functionality was a breeze and in no time my Console test harness app was running as a custom Azure Function secured by Azure AD!

All I have to do was to:

  • Provision a new Azure Function under our resource group and select Webhook + API template
  • Add all the required assemblies (Microsoft.IdentityModel dlls) through Kudu interface :
  • Next was to make slight changes to code and using #r to reference required assemblies:
  • And in no time I had a working Azure Function integrated with Dynamics 365 and protected by Azure AD!
  • Using App Service Editor adding the code to Visual Studio Online repo was a breeze:
  • Out of the box as a developer you have access to everything including CI and shortcut to various App Service setting:
  • As last step we simply make a call to our Azure Function and pass the required query parameters and we are done!.
    capture capture2


If you have not used Azure Functions or Logic Apps give it a try today, you will be happy!

Big shout outs to Darron Inman, Rich Ross from Philly MTC, Felipe Andrade from  Sao Paulo MTC and my buddy Kevin Orbaker for being part of team working on implementing the solution with me!