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 :
Power Automate - General Discussion
Suggested Answer

Power Automate 'Get_items" action is failing

(0) ShareShare
ReportReport
Posted on by 6
Hello All,
 
I am trying to run a simple Power Automate flow that grabs a list with attachments and moves them all to another list/library. For some reason, I am getting the following error:
 
Action 'Get_items' failed 
{"odata.error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Attempted to perform an unauthorized operation."}}}. 
 
I first thought it was a permissions issue but I have Site Owner, Site Admin, and Owner access so I am not sure what else could be causing the error. I am currently at a lost. Any help would be greatly appreciated! Thank you in advance! 
Categories:
I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    280 Super User 2025 Season 2 on at
    Power Automate 'Get_items" action is failing
    Good Afternoon Friend,
     
    So, it your get that is having the error and its a permission issue so there has to be something you don't have control of in the process.
     
     
    I would suggest checking the following (I will attempt to order these by difficulty):
     
    1. If the flow was built by someone else / a previous user or a teammate check the connector that is in use for SharePoint in the info panel. If you click on edit in the "Connection References" tile in the flow control panel you should be able to see who owns the connector then check those permissions.
     
       1a. If the flow is owned by you or someone with permissions to the list and its deployed by an app down the right side of the same screen you should see "Run only users" if its being deployed from an app this will appear make sure they have run as permissions if they are using the app calling the flow.
     
    2. Check for the list for unique permission sets:
     
    2a. Unique perms: Go to the list in question -> Click the gear cog in the top right corner -> click "List Settings" -> On the right side of the top panel "Permissions for List" -> Check for your perms or whoever owns the connectors in the list's unique perms.
     
    2b. Item level permissions: Some people use these to prevent random users from editing eachothers records if you have these with a flow performing this you will need to update the "Assigned to" field before you perform and context actions on the item.
     
    3. You can get around a lot of these if you can use "Send HTTP request to SharePoint" as a work around for a lot of these.
     
     
     
    Hopefully one of these solve your issue. If it does please select this as the solution for your issue if not feel free to follow up and I will try to continue assisting and have a good day.
  • David_MA Profile Picture
    12,908 Super User 2025 Season 2 on at
    Power Automate 'Get_items" action is failing
    In addition to the tips @MMcCloud mentioned, double check that the Get items action is connected to the correct SharePoint site. In my environment, there are many sites that have similar names. Maybe you accidentally selected the wrong site. Go to the SharePoint site and make sure the name listed in the action is identical to the display name of the site.
  • CU03121459-0 Profile Picture
    6 on at
    Power Automate 'Get_items" action is failing
    @MMcCloud - I verified steps 1 and 2 and everything seems correct. and I'm still getting the same error. I am not sure how to attempt step 3 using the "Send HTTP request to SharePoint" Do you have instructions on how to do this? 

    @David MA - I verified and made sure the 'Get_items' action was connected to the correct SharePoint site. 
  • CU03121459-0 Profile Picture
    6 on at
    Power Automate 'Get_items" action is failing
    Actually, I think I may have found the solution! Please see the attached screenshot. I had to click on the ellipsis next to the green check mark and make sure the correct account connector was selected. 
     
    The flow was able to run successfully, but it didn't actually copy the list or attachments over to the new list. I've attached screenshots of the flow and censored out some of the business information. If anyone can assist on why the list and attachments didn't copy over to the new "TEST" list, I'd greatly appreciate it! Thank you!
  • Suggested answer
    MMcCloud Profile Picture
    280 Super User 2025 Season 2 on at
    Power Automate 'Get_items" action is failing
    For the HTTP action request you would
     
    Use the "Send an HTTP request to SharePoint"
     
    Site Address: Select your site where the list lives
    Method: Get
    URI: 
    _api/web/lists/GetByTitle('YourListName')/items(<ItemID>)/AttachmentFile 
     
    You need to replace 'YourListName' with the name of your list and ItemID with the trigger which I imagine has the item you are copying in it.
     
    Headers: Accept: application/json;odata=verbose
     
     
    Just a follow up does your original attempt with the out of the box request connectors look like this:
     
    Actions in order
    "Get Attachments" [Site Address:'YourSiteAddress', List Name:'YourListName', Id:'Item ID from trigger]
     
    "For Each File in Get Attachments" ->
     
    "Get File Content" [Site Address:'YourSiteAddress', File Identifier: Id from the loop item]
     
    "Create File" [Site Address: 'YourCreateTargetSiteAddress', Folder Path: 'Select it manually to test', File Name: Something Unique or it breaks if it already exists, FileContent: 'Body of the get file content before']
     
    Delay by a few seconds to prevent too many actions from being performed at once. -When testing try it first with all static values to remove chances of error.
     
    Let me know if this fixes it or if we need to keep trying.
  • CU03121459-0 Profile Picture
    6 on at
    Power Automate 'Get_items" action is failing
    @MMcCloud - The out of box connectors are set up as follows:

    "Get items" 
    "Apply to each" 
    "Get attachments"
    "Create item"
    "Apply to each 2"
    "Get attachment content"
    "Add attachment"
     
     

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

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 544 Moderator

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 482 Super User 2025 Season 2

#3
chiaraalina Profile Picture

chiaraalina 287

Last 30 days Overall leaderboard