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

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
Highlighted
Power Automate
Power Automate

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
Highlighted
Community Support
Community Support

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.
Highlighted
Power Automate
Power Automate

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

Hi @masisley,

 

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

 

-Yutao

Highlighted
New Member

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

Thanks
Andrea
Highlighted
New Member

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?

Highlighted

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

Highlighted
Regular Visitor

Can we get an update on this? My clients are eager for integrations that require something this.
Highlighted
New Member

any feedback on this

Highlighted

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

Highlighted

Hi caromo,

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

Mark

Highlighted

Please advise did you update?

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Kudoed Authors
Users online (11,059)