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 / Power Automate / SharePoint site creati...
Power Automate
Suggested Answer

SharePoint site creation with graph api

(2) ShareShare
ReportReport
Posted on by 4
Hello
i am traing to create sharepoint site on power automate with the http action using an azure app registration, i tried with graph api but it is not working i think that the uri and the bidy are not correct
i gives all the required permissions for my app registration but still not working
can anyone help me on this ? i need the uri, headers, body 
i tried with the atcion : send http request to sharepoint and it is working but i want it with an app registration
 
thank you
Capture d'écran 2026-06-13 003416.png
Categories:
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,983 on at
    While Microsoft Graph is useful for many SharePoint operations, the SharePoint Admin API (_api/SPSiteManager/create) is generally the preferred and more
     
    consistent approach for automated site provisioning using an Azure App Registration.

    If you can share the exact URI, headers, request body, and the full error message, it will be much easier to identify the specific issue.
  • Suggested answer
    Valantis Profile Picture
    6,456 on at
     
    Here's the exact setup for creating a SharePoint site via Graph API with an app registration.
     
    HTTP Action configuration:
    - Method: POST
    - URI: https://graph.microsoft.com/v1.0/sites/root/sites
    - Headers:
      Content-Type: application/json
    - Authentication: Active Directory OAuth
      - Authority: https://login.microsoftonline.com
      - Tenant: your-tenant-id
      - Audience: https://graph.microsoft.com
      - Client ID: your app registration client ID
      - Secret: your client secret
     
    Body:
    {
      "displayName": "My New Site",
      "name": "mynewsite",
      "webTemplate": "STS#3"
    }
     
    Required Graph permissions on the app registration: Sites.Manage.All (Application permission) this requires admin consent.
     
    If that endpoint doesn't work, the SharePoint Admin API approach is more reliable:

    - URI: https://yourtenant-admin.sharepoint.com/_api/SPSiteManager/create
    - Same auth setup but Audience: https://yourtenant-admin.sharepoint.com
    - Required permission: Sites.FullControl.All
     
    Share the exact error message if it still fails and we can narrow it down.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

  • Vish WR Profile Picture
    3,610 on at
    when u use graph api what error are u getting ?
  • Antidote Profile Picture
    4 on at
    @Valantis i tried both of your ideas, 
     
    first one with graph : Invalid request
    the second one with admin sharepoint i got : Unsupported app only token.
     
     
     
    Capture d’écran 2...
    Capture d’écran 2...

    Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

  • Suggested answer
    Valantis Profile Picture
    6,456 on at
     
    Creating a SharePoint site via Graph is only available in the beta API, not v1.0. That's why you're getting "Invalid request" with v1.0.
     
    Correct endpoint:
    POST https://graph.microsoft.com/beta/sites
    Body:
    {
      "name": "commsite1",
      "webUrl": "https://yourtenant.sharepoint.com/sites/commsite1",
      "locale": "en-US",
      "template": "SitePage#0"
    }
     
    This is in beta, which means it may change and Microsoft doesn't guarantee stability for production use. Required permission: Sites.Manage.All as Application permission with admin consent.
     
    For the SharePoint Admin API "Unsupported app only token" issue: this is confirmed, the SharePoint _api endpoints reject client secret based app-only tokens and require a certificate on the app registration.
    So either use the Graph beta endpoint above with your client secret, or add a certificate to your Entra app registration and use that for the SharePoint Admin API approach.
     
    The Graph beta route is simpler if you just need to get this working without a certificate.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 442

#2
Vish WR Profile Picture

Vish WR 328

#3
David_MA Profile Picture

David_MA 268 Super User 2026 Season 1

Last 30 days Overall leaderboard