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

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,189 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,189 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

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard