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 / Apply Retention Policy...
Power Automate
Unanswered

Apply Retention Policy to a mailbox in a power automate cloud flow

(0) ShareShare
ReportReport
Posted on by

Hi All,

 

Am trying create a flow, which gets triggered once we fill a form, returns result which has UPN address, needs advise or assistance trying understand if we can apply a retention policy of that UPN address's mailbox, which if I'll be able to then at the end of the flow will be able to ensure that I could remove the user from the same retention policy.

 

So, far we have been doing this task automatically, by updating that user's email address as shown below by updating it in excel sheet and then running the below mentioned commands manually.

 

$list_16 = get-content "C:\temp\DR_Exceptions_Projects_OD_A to C.csv"

Set-RetentionCompliancePolicy -Identity "policyname" -AddExchangeLocation $list_16

Set-RetentionCompliancePolicy -Identity "policyname" -RemoveExchangeLocation $list_16

 

But now, while that we are creating a flow to automate that process, would want to see above task, if at all can be added to a flow and ensure it happens automatically.

 

Thanking everyone in advance,

 

Regards,

Vivek

Categories:

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 302 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 130

Last 30 days Overall leaderboard