Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Microsoft Flow Javascript SDK: How to get the 'Access Token' for the user?

I am trying to put the "Approval" web-app inside the SharePoint Page using Flow JS SDK.

While following the guide, I encountered a problem regarding getting the `AccessToken`. On the Flow JS SDK documentation, it says:

"The widget raises a GET_ACCESS_TOKEN event to request an access token from the host. The host needs to handle the event and pass the token to the widget"


The `widget` listens to the event like:

widget.listen("GET_ACCESS_TOKEN", function(requestParam, widgetDoneCallback) {
    widgetDoneCallback(null, {
        token:  '<accesstokenFromHost>'


What exactly do I need to do in order to get this AccessToken please? 


Or, since I'm putting this on SharePoint Page, which is already behind the AD login, is there already an AccessToken that can be easily retrieved from the SharePoint session?


Appreciate the kind helps. Thank you.

Community Support
Community Support

Hi @anonymust ,


If you wants to get the SharePoint Site's token, you could check this link: 


Best Regards,


Helpful resources

Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (1,733)