I'm not sure whether what you're trying to do is possible, but if it is you would likely need to write a custom connector. @Miguel Escobar may be able to provide more guidance.
Microsoft Authentication Library (msal) with Power Automate
I would like to generate new tokens (from Microsoft graph api) and reuse tokens (until they expire) using power automate. However I do not see any built in connectors to use msal. One solution is as below:
However as you can see, each time the table is modified, it generates a new token. I would like to avoid this step and instead use token cache until I am required to generate new token. I see that 3rd party libraries (python, c# etc) provide this capability. Given such libraries exist, how can I leverage them to securely generate and reuse tokens - do I have to create a custom connector and invoke a python script (utilizing msal lib) from Azure functions? If so, this looks a bit convoluted since MSAL is integral and part and parcel of MS, so I was hoping for more direct integration with a cleaner solution.
2 answers
Sort by: Most helpful
-
Ehren (MSFT) 1,781 Reputation points Microsoft Employee
2021-03-17T21:29:11.327+00:00 -
Miguel Escobar 326 Reputation points
2021-03-17T21:40:05.177+00:00 Hey!
I believe what you'll need is a Power Automate custom connector:
https://learn.microsoft.com/en-us/connectors/custom-connectors/define-blankThere's even this tutorial that can help you with creating that custom connector for Power Automate:
https://learn.microsoft.com/en-us/graph/tutorials/power-automateIn terms of MSAL vs ADAL, I believe you can create a custom connector that supports either.
Hope this helps!