cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kevintaylor81
Frequent Visitor

Update SharePoint site page properties with Send HTTP request

Greetings,

 

I have a list in one SharePoint site which represents normalized data I want to turn into site pages. I'm using this technique to make it happen:

 

(39) Create SharePoint Site Pages automatically with Power Automate - YouTube

 

In some of the columns on my list of items that I will convert to site pages have data that I want to map to site page properties. The end goal I'm shooting for is the same as what's highlighted in the video I shared. A list in one SP site driving the creating of pages in another SP library. The one variation I want to make here is updating page properties after the new page has been created. This is important because I need these properties to develop the UX my end-users will need and I don't want to do this by hand since we have a few hundred list items to convert to site pages.

5 REPLIES 5
Expiscornovus
Super User
Super User

Hi @kevintaylor81,

 

It should be possible to use the update file properties action for this.

 

Below is an example of that.

 

pageproperties_updatefile.png

@Expiscornovus Thanks! That got me moving forward but I've hit a new snag

 

I'm getting an access denied error in my flow's second step.

 

Web capture_25-6-2021_12059_us.flow.microsoft.com.jpeg

Here is the raw output from that step.

{
    "statusCode"403,
    "headers": {
        "Pragma""no-cache",
        "x-ms-request-id""4364d59f-e0c0-0000-c4da-17f625367271",
        "Strict-Transport-Security""max-age=31536000; includeSubDomains",
        "X-Content-Type-Options""nosniff",
        "X-Frame-Options""DENY",
        "Cache-Control""no-store, no-cache",
        "Set-Cookie""ARRAffinity=8ce2988208de9833422b6cabc9516aa20d0421ce61bf7c3c18ce2a28cdfca90c;Path=/;HttpOnly;Secure;Domain=sharepointonline-eus.azconn-eus.p.azurewebsites.net,ARRAffinitySameSite=8ce2988208de9833422b6cabc9516aa20d0421ce61bf7c3c18ce2a28cdfca90c;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-eus.azconn-eus.p.azurewebsites.net",
        "Timing-Allow-Origin""*",
        "x-ms-apihub-cached-response""true",
        "Date""Fri, 25 Jun 2021 16:53:41 GMT",
        "Content-Length""500",
        "Content-Type""application/json",
        "Expires""-1"
    },
    "body": {
        "status"403,
        "message""Access denied.\r\nclientRequestId: 224187df-0df2-46de-8c23-f59f4f20884e\r\nserviceRequestId: 4364d59f-e0c0-0000-c4da-17f625367271",
        "errors": [
            "-2147024891",
            "System.UnauthorizedAccessException"
        ]
    }
}
Expiscornovus
Super User
Super User

Hi @kevintaylor81,

 

Can you share a screenshot of the configuration of that action? Just want to check for instance the URI in the action.

 

I also notice that you are using the GetFileByUrl method in your error message.

 

In SharePoint Online I have seen a lot of examples which use the GetFileByServerRelativeUrl method instead. Might be worth checking that as well:

https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-folders-and-files-with-rest#...

 

kevintaylor81
Frequent Visitor

Here is the image I think you're asking for. In the video I shared where the developer demonstrates this method, they started by using a relative URL method, but I wasn't able to get that to work so tried this. Would I just swap out that one string for GetFileByServerRelativeUrl?

Web capture_1-7-2021_204217_us.flow.microsoft.com.jpeg

kevintaylor81
Frequent Visitor

I tried the GetFileByServerRelativeUrl method and this is what I got.

 

Web capture_1-7-2021_204854_us.flow.microsoft.com.jpeg

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,623)