Skip to main content

Notifications

Community site session details
Power Automate - Building Flows
Answered

Apply a Retention Label on the item, Not Found

Like (0) ShareShare
ReportReport
Posted on 20 Feb 2024 14:22:15 by 13

Hey there,

I am using the flow to read in data from updated items and apply a retention label based on the data found. I had a working test where when and item was updated it would "apply the policy" i.e. send me an email that says the policy it updated the item to, and the logic seemed to work. I then got the RPA license and was able to allow the M365 Compliance connection. This is where it all seemed to fall apart. I get this for the body output;

 

    "body": {
        "error": {
            "code""NotFound",
            "message""Exception from Sharepoint API",
            "innererror": {
                "message""Exception from Sharepoint API",
                "type""Microsoft.Office.Compliance.AeDService.BusinessLayer.Error.ODataResponseException",
                "stacktrace""   at Microsoft.Office.Compliance.AeDService.BusinessLayer.Services.MigService.Clients.SharePointClient.<SendRequestAsync>d__7.MoveNext() in D:\\dbs\\el\\06e1\\sources\\dev\\AeDService\\AeDService.BusinessLayer\\Services\\MigService\\Clients\\SharePointClient.cs:line 137\r\n--- End of stack trace from previous location where exception was thrown ---
********** This message goes on for about 15 more lines so I cut it down to this for viewing *****************
            }
        }
    }
 
I am using these as for inputs. To validate any possible questions; I am able to manually set the label on the item within SharePoint, I am able to update the description field of the item as well. I thought maybe the ID given from the trigger is not the Listitem ID BUT I did find an article SharePoint Online - Retrieve an item (nintex.com) that says you can view the Listitem ID by enabling the ID column, but this could be wrong. I get the ID from the trigger "When a file is created or modified (properties only)". It also fails if I place a number manually in the Listitem ID slot with the same error.
FogOfWarScorn_0-1708438219625.png

I am sure the answer is simple and right there, but I just cannot see it! Thank you for any assistance!

  • Verified answer
    FogOfWarScorn Profile Picture
    13 on 21 Feb 2024 at 14:52:53
    Re: Apply a Retention Label on the item, Not Found

    I did figure this out! The retention item "Folder Path" syntax is inconsistent with the trigger "Folder" location, so I had to remove the single "/" in front of that and it worked!

  • FogOfWarScorn Profile Picture
    13 on 20 Feb 2024 at 17:01:29
    Re: Apply a Retention Label on the item, Not Found

    Hey @S-Venkadesh, Yes I am able to use the UI within SharePoint to apply the label. I am not sure if it can not find the file, the label, or the site at this point but it should as the rest of the flow works.

  • S-Venkadesh Profile Picture
    636 Super User 2025 Season 1 on 20 Feb 2024 at 15:12:11
    Re: Apply a Retention Label on the item, Not Found

    Hi @FogOfWarScorn ,
    could you please confirm whether you are able to manually apply the label using the UI?

    I hope this information is helpful. If it is, please consider giving a thumbs up 👍.

    Best regards,
    Venkadesh Sundaramurthy

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 101

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 82 Super User 2025 Season 1

#3
David_MA Profile Picture

David_MA 60 Super User 2025 Season 1

Overall leaderboard