Перейти к содержимому

Power Automate: Move emails out of shared mailboxes with MS Graph API - Application Permissions

Graciela @ Power GI

0:00 / 0:00

Power Automate: Move emails out of shared mailboxes with MS Graph API - Application Permissions

6 267 просмотров · 5 лет назад
Graciela @ Power GI
6,72 тыс. подписчиков
6 267 просмотров · 5 лет назад
Learn how to move emails in a shared mailbox to a different folder using Power Automate! Leveraging the Microsoft Graph API Set up Microsoft Graph API for application permissions - 0:00-4:30 Use MS Graph API in Power Automate with application permissions: 4:30 - end Download final flow using Active directory functionality https://powergi.net/resources/azure_d... Download final flow using 2 HTTP requests https://powergi.net/resources/move_em... Skeleton of each Request ---------------------------------------------------------------------------- Request for authentication: POST https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/token Header: Content-Type application/x-www-form-urlencoded Body: grant_type=client_credentials&client_id={client_app_id}client_secret={client_secret}&scope=https://graph.microsoft.com/.default NOTE: replace {tenant_id} , {client_app_id} and {client_secret} by the values in your Azure app :) ---------------------------------------------------------------------------- Request to move email POST https://graph.microsoft.com/v1.0/users/{sharedemail@yourdomain.com}/messages/{message id}/move Header: Authorization Bearer {access_code_from_auth_action} Body { "destinationId": "{your_folder_id}" } ---------------------------------------------------------------------------- Request to retrieve folder id GET https://graph.microsoft.com/v1.0/users/{sharedemail@yourdomain.com}/mailFolders Header: Authorization Bearer {access_code_from_auth_action} NOTE: replace {sharedemail@yourdomain.com} , {access_code_from_auth_action} and {message id} with your values :) Documentation ---------------------------------------------------------------------------- Documentation for moving email: https://docs.microsoft.com/en-us/grap... Documentation for listing mailfolders and retrieving destination ID: https://docs.microsoft.com/en-us/grap... ---------------------------------------------------------------------------- We can help! Contact us in graciela@powergi.net