cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Microsoft Employee

Flow SDK and embedding the Flow experience

Hi,

 

I'm now reading the article of Embed the Flow experience. Is there a more detailed documentation regarding this topic or Flow SDK in general? Particularly, I'm very interested in the capability of the Flow widget. Things like:

  • Responsiveness of the widget (auto resize/scale based on container size)
  • Does the widget expose any functions/callbacks/event-handlers that my app can interact with?
  • Authentication/authorization that I have to do to make Flow work inside my app.

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Power Automate Staff masisley
Power Automate Staff

Re: Flow SDK and embedding the Flow experience

Hi Yutao,

 

Currently this page is the only documentation we have on the Flow widget. We should be posting an update to that document shortly to update the sample code. Additionally, we have a sample application that we will be publishing shortly. The reason that this hasn’t yet been published is that there are still some technical obstacles that may prevent third party tokens from being successfully retrieved and used.

 

In answer to your questions:

 

Responsiveness of the widget (auto resize/scale based on container size)

  • The widget will auto resize based on the container size.

Does the widget expose any functions/callbacks/event-handlers that my app can interact with?

  • We currently only expose one callback for retrieving user tokens:

    widget.callbacks.GET_ACCESS_TOKEN = function(requestParam, widgetDoneCallback)
    {
        widgetDoneCallback(null, { token: accessTokenDictionary[requestParam.data.resource] });
    }
    We may create more in the future, but these haven’t yet been defined.

Authentication/authorization that I have to do to make Flow work inside my app.

  • The authorization story is still fluid and a few details need to be worked out before it's ready to go live.
  • You can currently use the templates widget without any authentication.
  • Details for authentication with the list/edit flows widget will be released along with the sample app I mentioned above once we are ready to support it.

Best,

 

Mark

View solution in original post

11 REPLIES 11
Community Support Team
Community Support Team

Re: Flow SDK and embedding the Flow experience

Hi @Yutao,

 

Thanks for checking this.

As the document states regarding the Microsoft Flow SDK:

"

The SDK isn't versioned yet, but that change is in our near-term backlog.

"

In addition to that page, I can't find any other documents which contains more details than that.

I will forward this from my side, if I got any helpful information, I will post back.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Power Automate Staff masisley
Power Automate Staff

Re: Flow SDK and embedding the Flow experience

Hi Yutao,

 

Currently this page is the only documentation we have on the Flow widget. We should be posting an update to that document shortly to update the sample code. Additionally, we have a sample application that we will be publishing shortly. The reason that this hasn’t yet been published is that there are still some technical obstacles that may prevent third party tokens from being successfully retrieved and used.

 

In answer to your questions:

 

Responsiveness of the widget (auto resize/scale based on container size)

  • The widget will auto resize based on the container size.

Does the widget expose any functions/callbacks/event-handlers that my app can interact with?

  • We currently only expose one callback for retrieving user tokens:

    widget.callbacks.GET_ACCESS_TOKEN = function(requestParam, widgetDoneCallback)
    {
        widgetDoneCallback(null, { token: accessTokenDictionary[requestParam.data.resource] });
    }
    We may create more in the future, but these haven’t yet been defined.

Authentication/authorization that I have to do to make Flow work inside my app.

  • The authorization story is still fluid and a few details need to be worked out before it's ready to go live.
  • You can currently use the templates widget without any authentication.
  • Details for authentication with the list/edit flows widget will be released along with the sample app I mentioned above once we are ready to support it.

Best,

 

Mark

View solution in original post

Microsoft Employee

Re: Flow SDK and embedding the Flow experience

Hi @masisley,

 

Thanks for the response! Looking forward to the update of the documentation and more features of the widget!

 

-Yutao

andrea
Level: Power Up

Re: Flow SDK and embedding the Flow experience

Hi,
Any update?
Is it possible to integrate my flow in a web application now?
Is it possible to authenticate sdk?

Thanks
Andrea
giacomo
Level: Powered On

Re: Flow SDK and embedding the Flow experience

Hi,

 

After thorough analysis, the calls within "msflowsdk-1.1.js" do not contain authentication methods with the user to be able to display "my flow" embedded in a web site.

In the call
  widget.callbacks.GET_ACCESS_TOKEN = function (requestParam, widgetDoneCallback)
        {
             var authCallback = function (token) {
                 widgetDoneCallback (null, {
                     token: token // Get AAD access token from your backend system
                 });
             };
         }

the token is passed, this is not used in any method in the library "Msflowsdk-1.1.js".

 

Have there been updates to the Microsoft Flow SDK to implement the integration of "my flow" into a website?

PhaniGoruganthu
Level: Powered On

Re: Flow SDK and embedding the Flow experience

Hi Team,

 

Could you please let us know how to get AAD token in below code to aceess created flows in our web app?

 

widget.callbacks.GET_ACCESS_TOKEN = function(requestParam, widgetDoneCallback)
{

widgetDoneCallback(null, {
token: ""// Get AAD access token from your backend system
});

}

 

I have tried get aceess token using below Oauth 2.0 implicit flow method. However, it is throwing invalid scope error.

 

https://login.microsoftonline.com/fxau.onmicrosoft.com/oauth2/v2.0/authorize?
client_id=7fd278e1-c329-4048-8967-884522629b5b
&response_type=token
&redirect_uri=http%3A%2F%2Flocalhost:5555
&scope=openid%20https%3A%2F%2Fservice.flow.microsoft.com%2F
&response_mode=fragment
&state=12345
&nonce=678910

 

Appreciate any help. 

 

Thanks & Regards,

Phani

gabbsmo
Level: Powered On

Re: Flow SDK and embedding the Flow experience

Can we get an update on this? My clients are eager for integrations that require something this.
Highlighted
remeezp
Level: Power Up

Re: Flow SDK and embedding the Flow experience

any feedback on this

caromo
Level: Power Up

Re: Flow SDK and embedding the Flow experience

Did you managed to get the AAD token? I'm struggling with the same issue

Power Automate Staff masisley
Power Automate Staff

Re: Flow SDK and embedding the Flow experience

Hi caromo,

We should be publishing an update to this documentation within about a week.

Mark

zahraa
Level: Power Up

Re: Flow SDK and embedding the Flow experience

Please advise did you update?

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (6,382)