Grant a manager access to a departing employee's OneDrive
Build a workflow with a page that takes the departing employee's email. Retrieve their OneDrive items and account details via Microsoft Graph, resolve their manager by email lookup, and grant the manager access to the items. Send the manager an email with the details/links. Handle large item sets with pagination, missing manager data, and Graph permission errors. Output the access granted and notification status.
What this prompt builds
Look up an employee's OneDrive and grant their manager access during offboarding, with email notification.
The problem
When someone leaves, their OneDrive files are stranded and the manager who needs them has no access, so work gets recreated or lost. Granting access manually in the admin center is fiddly and often forgotten.
Solution and impact
This workflow retrieves the employee's OneDrive items, identifies the manager by email, grants access, and notifies them. File handover during offboarding becomes a single guided action.
