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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Power Automate 'Get_it...
Power Automate
Suggested Answer

Power Automate 'Get_items" action is failing

(0) ShareShare
ReportReport
Posted on by 17
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! 
Screenshot 2025-12-03 101931.png
Categories:
I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    393 Moderator on at
    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
    15,293 Super User 2026 Season 2 on at
    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
    17 on at
    @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
    17 on at
    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!
    Flow 2.jpg
    Flow 1.jpg
  • Suggested answer
    MMcCloud Profile Picture
    393 Moderator on at
    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
    17 on at
    @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"
     
     
  • CU03121459-0 Profile Picture
    17 on at
    Ok everyone! We're making progress! Thanks for all the help so far from everyone! You guys are awesome!
     
    I was able to move items with their attachments from List A to List B. The 'problem' I am running into now is, List A has over 500 items but when I run the flow it is only moving 200 items with attachments to List B. The weird thing is, its not taking the first 200 in alphabetical order, its just taking 200 random items with their attachments. How do I get the flow to take all the items and attachments from List A to List B and not just a random 200 out of the 500+ items? 
  • Suggested answer
    MMcCloud Profile Picture
    393 Moderator on at
    Good Morning,
     
    Go under your get items where the extra items are occurring
     
    So basically we want:
     
    "Get Items" Action ->
    Elipses next to get items -> 
     
    Settings ->
     
    Enable Pagination ->
     
    Set the threshold to like 1000 if it goes up past like 5k items you need to do a REST API GET instead.
     
    If this solves your issue, please select it as the solution if not feel free to follow up, I will continue to assist glad we are close!
     
     
  • CU03121459-0 Profile Picture
    17 on at
    I actually just saw this setting when doing research and turned it on and set the threshold to 5000. I wish I saw your comment and did like 4000 instead but the flow is running now. I'll keep you all updated. I appreciate the quick replies! 
  • CU03121459-0 Profile Picture
    17 on at
    Hello everyone, thanks for all the help! I was able to successfully migrate 2 lists. Smaller lists of less than 400 entries. I will continue to keep you guys updated on the bigger lists that contain over 3000 entries. 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 272 Super User 2026 Season 2

#2
trice602 Profile Picture

trice602 147 Super User 2026 Season 2

#3
11manish Profile Picture

11manish 146 Super User 2026 Season 2

Last 30 days Overall leaderboard