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

GET HTTP Request to SharePoint - Results Only Visible When Triggered By Owner of Flow

Hi everyone,

 

I am using the HTTP Request to SharePoint to get information from the SharePoint recycle bin for a deleted item (which is also the trigger of the flow). The problem is, I only get results when I delete something with the user that is used for the connection within the flow. Obviously, this user has full admin rights to SharePoint.

 

When I delete the item with any other user, the results of the outputs are empty in the flow. On the other hand, when I execute the request directly in the browser for the user that deleted the item, the body is visible. It seems like not even the admin with global office admin rights has access to the results of another user.

 

Following an example:

 

I deleted an item on SharePoint with a test user. The body of the HTTP request to SharePoint is empty within the flow.

Tomeczek_0-1617702310483.png

On the other hand, executing the request directly in the browser for the test user is showing the body:

 

Tomeczek_1-1617702506272.png

 

Executing the request directly in the browser for the admin user, shows again an empty body:

 

Tomeczek_2-1617702643792.png

 

How can make sure the information is also available when an item is deleted with a different user?

 

1 ACCEPTED SOLUTION

Accepted Solutions
fchopo
Super User II
Super User II

Hello @Tomeczek 

As you may know, SharePoint has 2 recyle bins (user one, and site collection one). The items removed from the user recycle bin are then stored in the site collection recycle bin (2nd stage recycle bin). So, as a site collection administrator, you could access to those elements that are in the 2nd stage recycle bin.

 

On the other hand, Power Automate currently doesn't allow to "impersonate" a user identity when using HTTP request action, so you can't access a user's recyle bin. Another similar post can be found here: Solved: Access to other user's recycle bin in Sharepoint - Power Platform Community (microsoft.com)

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

3 REPLIES 3
fchopo
Super User II
Super User II

Hello @Tomeczek 

As you may know, SharePoint has 2 recyle bins (user one, and site collection one). The items removed from the user recycle bin are then stored in the site collection recycle bin (2nd stage recycle bin). So, as a site collection administrator, you could access to those elements that are in the 2nd stage recycle bin.

 

On the other hand, Power Automate currently doesn't allow to "impersonate" a user identity when using HTTP request action, so you can't access a user's recyle bin. Another similar post can be found here: Solved: Access to other user's recycle bin in Sharepoint - Power Platform Community (microsoft.com)

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

View solution in original post

Tomeczek
Frequent Visitor

Hi @fchopo ,

 

thanks for your reply. How can I access this collection recycle bin? In other words what needs to be changed in the uri?

 

/_api/web/RecycleBin?

 

/_api/web/RecycleBin -> User's recycle bin

/_api/site/RecycleBin -> 2nd stage recycle bin (you have to be site collection administrator)

 

Hope it helps!

Ferran

Did I answer your question? Please consider to mark my post as a solution to help others.
Proud to be a Flownaut!

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (72,900)