Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 Community / Forums / Sales forum / Automatically enable m...
Sales forum
Suggested answer

Automatically enable mailboxes for D365 Outlook Add-in

Posted on by 50

Is it possible to automatically enable a mailbox for D365 sync and integration, without having to go into PPAC mailboxes and enable, approve, test for each user manually?

Goal is to setup an Azure AD group like "Dynamics 365 Sales" which will be assigne the appropriate role, and trigger automatic enablement of server-side sync and approving, testing mailboxes.

For users to be eligible for Dynamics 365 App for Outlook, they need to:

1. Setup server-side synchronization on their mailbox for incoming emails and for appointments, contacts and tasks.
2. Approve their mailbox. 
3. Tested and enabled their mailbox.
4. Add the user to the Dynamics 365 App for Outlook User security role.

  • Eric B Profile Picture
    Eric B 5 on at
    RE: Automatically enable mailboxes for D365 Outlook Add-in

    You could use a webjob with those scripts to keep this cloud based and running on a schedule as well.

  • Levi Stevens Profile Picture
    Levi Stevens 50 on at
    RE: Automatically enable mailboxes for D365 Outlook Add-in

    So, for steps #3 or #4 you are suggesting it needs to essentially be a Power Automate flow, or an Azure Function if the goal is for this to be hands free and cloud only.

  • Suggested answer
    Shawnsauve Profile Picture
    Shawnsauve 1,087 on at
    RE: Automatically enable mailboxes for D365 Outlook Add-in

    Yes, it is possible to automatically enable a mailbox for Dynamics 365 sync and integration. Here are the general steps to achieve this:

    1. Create an Azure AD group, like "Dynamics 365 Sales".

    2. Assign the group the appropriate Dynamics 365 roles, such as the Dynamics 365 App for Outlook User role and the Dynamics 365 Sales Manager role.

    3. Use PowerShell or the Microsoft Graph API to programmatically enable server-side sync for the mailboxes of all users in the "Dynamics 365 Sales" group. This can be done by setting the "ServerSideSyncEnabled" attribute to "True" for each user mailbox.

    4. Use PowerShell or the Microsoft Graph API to programmatically approve and test the mailboxes of all users in the "Dynamics 365 Sales" group. This can be done by setting the "IncomingEmailEnabled" attribute and the "IsTestMailbox" attribute to "True" for each user mailbox.

    5. Finally, add each user to the Dynamics 365 App for Outlook User security role, either manually or programmatically.

    Note that these steps may vary depending on your specific Dynamics 365 configuration and environment, so it's important to consult Microsoft documentation and seek the assistance of a qualified Dynamics 365 administrator or developer if needed.

  • Suggested answer
    Haig Liu Profile Picture
    Haig Liu Microsoft Employee on at
    RE: Automatically enable mailboxes for D365 Outlook Add-in

    Hi Levi Stevens,

    I think it is highly unlikely that this will be done using security roles.
    If you get tired of manually approving it over and over again, you could try turning this off:

    https://learn.microsoft.com/en-gb/power-platform/admin/connect-exchange-online#remove-the-requirement-to-approve-mailboxes

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,914 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,549 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans