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"}
