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

Community site session details

Session Id : mEAKbLHsJYvQmyNcwu9nwc
Power Automate - Building Flows
Answered

Setting Page Author Modern Page

Like (0) ShareShare
ReportReport
Posted on 22 Aug 2023 10:04:59 by 168

Hi I have a flow that creates a modern page and I'm trying to set the Page Author to a specific user. I set the Author Byline claims properties to the relevant claims address which seems to set the author but when I edit the page the author becomes blank. Any tips appreciated .

Ianhall1892_2-1692698672736.png

 

Ianhall1892_0-1692698519605.png

 

I have the same question (0)
  • Ianhall1892 Profile Picture
    168 on 29 Aug 2023 at 10:42:41
    Re: Setting Page Author Modern Page

    Thanks for the help that's what I was after 

  • Verified answer
    Expiscornovus Profile Picture
    32,245 Most Valuable Professional on 22 Aug 2023 at 11:02:10
    Re: Setting Page Author Modern Page

    Hi @Ianhall1892,

     

    As far as I can see is that not only a property gets set, but also settings in the LayoutWebpartsContent as well. I think if you only set the AuthorByLine property the properties in the LayoutWebPartsContent will still have an old/empty value. When you edit the page it seems to revert back to whatever is in that content. I can definitely reproduce your issue by only setting that AuthorByLine file property.

     

    To workaround this you could also try and set those other properties as well. Try something like below and let me know if that works for you?

     

    Below is an example

    In this example I used this as the payload for the HTTP request with the SavePage method.

    {"__metadata":{"type":"SP.Publishing.SitePage"},"LayoutWebpartsContent":"[{\"id\":\"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\"instanceId\":\"cbe7b0a9-3504-44dd-a3a3-0e5cacd07788\",\"title\":\"\\n Title area\\n \",\"description\":\"\\n Title area description\\n \",\"audiences\":[],\"serverProcessedContent\":{\"htmlStrings\":{},\"searchablePlainTexts\":{},\"imageSources\":{\"imageSource\":\"/_layouts/15/images/sleektemplateimagetile.jpg\"},\"links\":{},\"customMetadata\":{\"imageSource\":{}}},\"dataVersion\":\"1.4\",\"properties\":{\"imageSourceType\":2,\"title\":\"Set Author\",\"textAlignment\":\"Left\",\"showPublishDate\":false,\"authors\":[{\"id\":\"@{outputs('Get_user_profile_(V2)')?['body/mail']}\",\"email\":\"@{outputs('Get_user_profile_(V2)')?['body/mail']}\",\"name\":\"@{outputs('Get_user_profile_(V2)')?['body/displayName']}\",\"role\":\"@{outputs('Get_user_profile_(V2)')?['body/jobTitle']}\"}],\"showTopicHeader\":false,\"authorByline\":[\"@{outputs('Get_user_profile_(V2)')?['body/mail']}\"],\"layoutType\":\"CutInShape\",\"topicHeader\":\"\",\"enableGradientEffect\":true,\"isDecorative\":true},\"containsDynamicDataSource\":false,\"reservedHeight\":356}]","AuthorByline":["@{outputs('Get_user_profile_(V2)')?['body/mail']}"],"TopicHeader":"","BannerImageUrl":"/_layouts/15/images/sitepagethumbnail.png","Title":"Set Author"}

     

    authorbyline_layoutwebpartscontent.png

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 954 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 650 Moderator

#3
trice602 Profile Picture

trice602 327 Super User 2025 Season 2

Last 30 days Overall leaderboard