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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Copilot Studio / End-to-End SharePoint ...
Copilot Studio
Suggested Answer

End-to-End SharePoint Provisioning via Copilot Studio Using Excel Schema and PnP PowerShell

(0) ShareShare
ReportReport
Posted on by 6

I want to know if it is possible to build a Copilot Studio agent that can perform the following end-to-end automation:

✅ What the agent should do

  1. Read an Excel file stored in SharePoint (user provides the file URL)
  2. Parse the schema from the file, including:
    • Site details
    • List names
    • Column names and types
    • Permission groups and role assignments
  3. Generate a complete PnP PowerShell script dynamically based on that schema
  4. Execute the script automatically to:
    • Create a SharePoint site
    • Create lists and columns
    • Create and assign permission groups and permissions

✅ Key requirements

  • No hardcoded structure — everything must come from the Excel file
  • Excel is the single source of truth
  • Both script generation and execution are triggered from the Copilot agent

    (optionally via Power Automate)

❓ Questions

  1. Is this end-to-end automation possible using Copilot Studio alone, or does it require:
    • Power Automate, plus
    • Azure Automation Runbooks / Hybrid Worker / Azure Functions / VM, or similar services to execute PnP PowerShell?
  2. What is the recommended and secure architecture for running PnP PowerShell from a Copilot-triggered workflow?
  3. Are there any official Microsoft docs, blogs, or step-by-step guides covering:
    • Copilot Studio → Power Automate → PowerShell execution patterns
    • Secure authentication methods for PnP PowerShell (App-only, Managed Identity, etc.)
    • Schema-driven SharePoint provisioning from Excel or files
  4. What are the current limitations of this approach, for example:
    • Copilot Studio limitations in executing scripts or long-running jobs
    • Power Automate limits (timeouts, file size, Excel parsing, throttling)
    • Authentication and permission constraints
    • Governance and security considerations
    • Scalability and error-handling challenges

Any reference architectures, examples, best practices, or known limitations would be greatly appreciated.

Screenshot 2026-01-08 143848.png
Categories:
I have the same question (1)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,963 Moderator on at
     
    Let's be super clear, if you are using Copilot you are using Power Automate. There is no way to do it without it. Because every Tool, Agent Flow, Connector, MCP etc etc etc is all just Power Automate behind the scenes.
     
    Beyond that you are asking so many super deep, generic questions that you really need to hire someone, (no not me I wouldn't spend the time right now), but asking for forum to give you these types of answers is too general. You can do research yourself for most of them.
     
    Is it possible to do what you want?
    Yes.
    Why? because it isn't hard to read from an excel file to generate Power Shell Scripts that you execute as its just text.
     
    The hard part is getting it right, have the correct configuration, making sure your tenant is configured correctly, SharePoint is configured correctly, and you have the proper DLP, Security groups, roles and many other things to make it possible.
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 671

#2
Vish WR Profile Picture

Vish WR 266

#3
Haque Profile Picture

Haque 265

Last 30 days Overall leaderboard