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 / Error when using HTTP ...
Power Automate
Answered

Error when using HTTP request for site creation

(0) ShareShare
ReportReport
Posted on by 4

Hi,

I get some error when trying to create a site using HTTP request. It's pretty straight forward, so not sure what i'm doing wrong.

sdfsdef_0-1687178009672.png

 

I'm basicly following this: https://learn.microsoft.com/en-us/sharepoint/dev/apis/site-creation-rest, but I get this error:

 

"Cannot convert a primitive value to the expected type 'Edm.Guid'. See the inner exception for more details.
clientRequestId: 3544ed78-e876-4f6f-b983-de761d962653
serviceRequestId: 8259bea0-00af-6000-b8e0-e80699d5be82"

 

Any help would be appreciated.

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @sdfsdef,

     

    Can you try the same POST request with verbose headers?

     

    {
     "Accept": "application/json;odata=verbose",
     "Content-Type": "application/json;odata=verbose"
    }

     

    Also try the payload below. Obviously update the url to your tenant name.

     

     

    {
    "request":{
    "Title":"@{triggerOutputs()?['body/Title']}",
    "Lcid":1033,
    "Description":"@{triggerOutputs()?['body/Description']}",
    "Classification":"",
    "ShareByEmailEnabled":false,
    "SiteDesignId":"6142d2a0-63a5-4ba0-aede-d9fefca2c767",
    "Url":"https://contoso.sharepoint.com/sites/@{triggerOutputs()?['body/Title']}",
    "WebTemplate":"SITEPAGEPUBLISHING#0",
    "Owner":"@{triggerOutputs()?['body/Author/Email']}",
    "WebTemplateExtensionId":"00000000-0000-0000-0000-000000000000"
    }
    }

     

     

    verboseheaders.png

  • sdfsdef Profile Picture
    4 on at

    Thanks for the reply!

    The "verbose headers" did not help.

     

    However, your updated payload fixed the issue! 😀

     

    Do you mind explaining the issue? The issue was the SensitivityLabel?

     

    Thanks alot!

  • Expiscornovus Profile Picture
    33,830 Most Valuable Professional on at

    Hi @sdfsdef,

     

    Yeah, in that case it probably was that SensitivityLabel value.

     

    You used:

    "SensitivityLabel":"<Your Sensitivity label ID>",

     

    In that case it will try and use a Sensitivity label with the GUID <Your Sensitivity label ID>. But that is not an actual GUID, but a string value. That's why you probably are getting the Cannot convert a primitive value to the expected type 'Edm.Guid' error.

     

    If you want to leave that empty you should use the below:

    "SensitivityLabel":"",

     

    Or remove the whole property, like I did in my example.

     

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 552

#2
Valantis Profile Picture

Valantis 388

#3
11manish Profile Picture

11manish 375

Last 30 days Overall leaderboard