Good morning everyone,
I created a flow with MS Form that allows you to collect data and insert it in a sharepoint item list.
Unfortunately, however, all the elements created in sharepoint have the creator of the stream as author, thus not allowing the filter by author or the view elements only by the creator.
How can I fix the flow to show the correct author name?
Thanks,
Best Regards,
Andrea
Solved! Go to Solution.
Hi @AndreaWest83,
You could introduce a new person or group type of column for this and map to the responder's email to that field in the create item action.
Alternatively, you can also use an Send an HTTP request action with the validateUpdateListItem method of the REST API to update the item after it has been created and correct the Author field value to what you want.
@tom_riha has written a nice blogpost about this second approach:
https://tomriha.com/how-to-change-sharepoint-item-author-created-by-with-power-automate/
Hi @AndreaWest83,
You could introduce a new person or group type of column for this and map to the responder's email to that field in the create item action.
Alternatively, you can also use an Send an HTTP request action with the validateUpdateListItem method of the REST API to update the item after it has been created and correct the Author field value to what you want.
@tom_riha has written a nice blogpost about this second approach:
https://tomriha.com/how-to-change-sharepoint-item-author-created-by-with-power-automate/
Thanks for the quick reply.
I tried the flow, but I get the error 401 UNAUTHORIZED.
But my account is the same one that creates the object in sharepoint.
How is it possible?
{
"statusCode": 401,
"headers": {
"Pragma": "no-cache",
"x-ms-request-id": "f85340a0-60fc-4000-340f-5b42d710f065",
"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=f5590XXXX;Path=/;HttpOnly;Secure;Domain=sharepointonline-we.XX.net,ARRAffinitySameSite=XXX;Path=/;HttpOnly;SameSite=None;Secure;Domain=sharepointonline-we.XXXXXt",
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "true",
"x-ms-apihub-obo": "true",
"Date": "Mon, 23 May 2022 22:38:51 GMT",
"Content-Length": "337",
"Content-Type": "application/json",
"Expires": "-1"
},
"body": {
"status": 401,
"message": "401 UNAUTHORIZED\r\nclientRequestId: 77XXX08c\r\nserviceRequestId: f8XXXXX5",
"source": "https://rXXXXXXX.sharepoint.com/sites/Agent/pi/web/lists/GetByTitle('Control')/items(115)/validateUpdateListItem",
"errors": []
}
}
Hi @Expiscornovus,
I'm sorry I wrote the link wrong, I wrote the link wrong:
_api/web/lists/GetByTitle(
Now everything works, but I don't change the author column.
The output I get this error:
"ErrorMessage": "Organization policies do not allow sharing with these users. Go to External Sharing in the Office 365 Admin Center to enable it.",
Hi @AndreaWest83,
Can you share a screenshot of the configuration of your Send an HTTP request action? This way we can check if something is not missing in there.
The error suggests you might be using a guest account for the author value? Is that correct, can you check that as well?
Hi @AndreaWest83,
I see in the screenshot the FieldValue is:
[{'Key':'i:0#.f|membership|<autore email>'}]
Can you try it without the < & > characters?
[{'Key':'i:0#.f|membership|autore email'}]
And can you also check the flow history if the email which is used is of an employee (internal) or of a guest user (external)?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Announcing a new way to share your feedback with the Power Automate Team.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
70 | |
24 | |
18 | |
16 | |
13 |
User | Count |
---|---|
133 | |
43 | |
32 | |
32 | |
28 |