Skip to main content

Notifications

Power Automate - Using Connectors
Unanswered

Access SharePoint list items using HTTP action

(0) ShareShare
ReportReport
Posted on by 30

Hi I am accessing Sharepoint list items using Http action.

I added the bearer token as Authorization header .

GetItem.PNG

When the flow runs it failed and throw this error :

{
"error": {
"code": "-2130575338, System.ArgumentException",
"message": {
"lang": "en-US",
"value": "Item does not exist. It may have been deleted by another user."
}
}
}
that also happens using postman.
If I used "Send HTTP request for sharepoint" action everything will work correctly without bearer token.
 
Regards,
  • Emad_Gerges Profile Picture
    Emad_Gerges 30 on at
    Re: Access SharePoint list items using HTTP action

    The item exists in the list and can be accessed by normal HTTP to SharePoint action but cannot be accessed by normal HTTP action with bearer token 

  • v-bacao-msft Profile Picture
    v-bacao-msft on at
    Re: Access SharePoint list items using HTTP action

    Hi @Emad_Gerges ,

     

    Since the error message shows that Item does not exist, please try to output ID, and then check whether the item corresponding to the item ID exists in the List.

    Or you could choose the Basic authentication method and enter valid username and password to test.

    Besides, I think Get item action and Send an HTTP request to SharePoint included in SharePoint connector are still the first choice. Use them to easily meet your needs.

     

    Best Regards,

  • yashag2255 Profile Picture
    yashag2255 24,442 on at
    Re: Access SharePoint list items using HTTP action

    @Emad_Gerges 

     

    Maybe/ maybe not. Can you please try doing this: In the URI, remove everything after the items '(id)' and run te flow and check what data is being returned?

  • Emad_Gerges Profile Picture
    Emad_Gerges 30 on at
    Re: Access SharePoint list items using HTTP action

     

    I don't think it is related to any of factors you mentioned because in browser I can do same action and get results .

    It is related to HTTP action with bearer token to get List Items .

    When I used same HTTP action with access token to get user claim it worked and retrieve user data

    Why this happens only on list item level ?

  • Pstork1 Profile Picture
    Pstork1 64,996 on at
    Re: Access SharePoint list items using HTTP action

    Those articles pre-date MS releasing the SharePoint HTTP call.  The new action was released when the original HTTP request action was made a premium feature in Feb, 2019.  Since there are things that only work via HTTP in SharePoint MS released a special version that works with SharePoint that is standard.  I agree it should work with the regular HTTP request, but the SharePoint one should be easier (and cheaper) to use.

  • yashag2255 Profile Picture
    yashag2255 24,442 on at
    Re: Access SharePoint list items using HTTP action

    Hi @Emad_Gerges 

     

    There can be more than one reasons for this issue that you are facing. And those could include Caching, delays, browser support, mapping the correct IDs, lists and the site etc. Addressing these issues, the send HTTP request to SharePoint was brought in and that has replaced all the heavy lifting and the tedious process of the authorisation token and doing it the traditional way. 

     

    Hope this Helps!

     

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

  • Emad_Gerges Profile Picture
    Emad_Gerges 30 on at
    Re: Access SharePoint list items using HTTP action

    All articles are talking about HTTP request :

    https://noellawlor.wordpress.com/2018/01/18/setting-sharepoint-item-list-permissions-with-flow/

    https://www.anupams.net/sharepoint-rest-service-microsoft-flow/

    For that I tried to use the same.

    With Sharepoint actions everything is working perfectelly . 

    It should work also with HTTP action as article mentioned but for some reason it throw this error so I want to know why this happens?

     

     

     

  • Emad_Gerges Profile Picture
    Emad_Gerges 30 on at
    Re: Access SharePoint list items using HTTP action

    Hi ,

    My Scenario was the following :

    I want to set item level permission using MS Flow like this article steps

    https://noellawlor.wordpress.com/2018/01/18/setting-sharepoint-item-list-permissions-with-flow/

    When I tried to do that HTTP action to break inheritance after creating the bearer token it throw the mentioned error "Item does not exists"

    So I tried to do same with "Send HTTP request to SharePoint" It is working correctly.

    I thought it might be my token permission issue so I changed to give it fullControl

    then tried but same error .

    Finally, I tried to simplify the issue by  tring HTTP action to get item not Sharepoint default get item action .

    but same issue happen.

    The article does not mention under which context flow should run so I followed the same.

     

    Regards,

    Emad

  • Pstork1 Profile Picture
    Pstork1 64,996 on at
    Re: Access SharePoint list items using HTTP action

    Is there a particular reason you don't want to use the Send HTTP request to SharePoint instead of the generic HTTP connector?  The generic connector is a premium feature while the SharePoint HTTP request is standard. In terms of the HTTP you send they should allow for the same payload.  You might have better luck with the one designed to work wiht SharePoint.

  • yashag2255 Profile Picture
    yashag2255 24,442 on at
    Re: Access SharePoint list items using HTTP action

    Hi @Emad_Gerges 

     

    Can you please share more information on this? (As to what context are you using the generic Send HTTP request or the Send HTTP request to SharePoint to get item(s) considering that one can use the Get Item and Get Item(s) actions directly). Just trying to understand the backgound for these actions before diving into identify the issue. 

     

     

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,666

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,996

Leaderboard

Featured topics