Skip to content

feat: new sample react-command-authenticated-flowtrigger added - #1594

Merged
hugoabernier merged 2 commits into
pnp:mainfrom
ejazhussain:react-command-authenticated-flowtrigger
Jan 31, 2026
Merged

feat: new sample react-command-authenticated-flowtrigger added#1594
hugoabernier merged 2 commits into
pnp:mainfrom
ejazhussain:react-command-authenticated-flowtrigger

Conversation

@ejazhussain

@ejazhussain ejazhussain commented Jan 27, 2026

Copy link
Copy Markdown
Contributor

By submitting this pull request, you agree to the contribution guidelines

Q A
Bug fix? no
New feature? no
New sample? yes
Related issues? n/a

What's in this Pull Request?

This PR adds a new SPFx ListView CommandSet extension sample that demonstrates how to trigger an authenticated Power Automate flow from a SharePoint document library.

Sample: Authenticated Power Automate Flow Trigger

Key Features:

  • Securely triggers Power Automate flows using OAuth authentication with AadHttpClient
  • Adds custom commands to SharePoint document library command bars
  • Passes document metadata, user information, and site context to the flow
  • Displays a modern Fluent UI dialog with loading states and result feedback
  • Demonstrates proper SPFx API permission requests for Microsoft Flow Service

Technical Details:

  • SPFx Version: 1.22.0
  • Node.js: v22.17.0
  • Compatible with: SharePoint Online
  • Extension Type: ListView CommandSet
  • API Permissions: Microsoft Flow Service (user_impersonation)

Use Case:
When a user selects a document in a SharePoint library, they can trigger a Power Automate flow configured with the "When an HTTP request is received" trigger and "Any user in my tenant" authentication. The extension passes contextual information about the selected document, current user, and site to the flow.

Documentation Includes:

  • Complete setup instructions for Power Automate flow configuration
  • API permission approval steps
  • Detailed request body schema
  • Development and deployment guidance
  • Troubleshooting section

Author: Ejaz Hussain (@ejazhussain)

@hugoabernier
hugoabernier merged commit 180bcb0 into pnp:main Jan 31, 2026
3 checks passed
@hugoabernier

Copy link
Copy Markdown
Collaborator

Thanks @ejazhussain for your sample! Awesome!

We'd love to have your sample featured in one of our future community calls.

If haven't done so yet, and you'd be interested on showing this great sample in a public community call, please fill in following form and we'll get you scheduled - aka.ms/community/request/demo

Thank you for sharing your sample with others - you rock! 👏🥇👩‍💻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants