web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Microsoft Flow Javascr...
Power Automate
Unanswered

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

(0) ShareShare
ReportReport
Posted on by 12

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.

Categories:
I have the same question (0)
  • v-bofeng-msft Profile Picture
    on at

    Hi @anonymust ,

     

    If you wants to get the SharePoint Site's token, you could check this link:
    https://global-sharepoint.com/sharepoint-online/in-4-steps-access-sharepoint-online-data-using-postman-tool/ 

     

    Best Regards,

    Bof

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 519 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 296 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard