Thursday, December 6, 2018

Auto Sending Emails as Another User in Dynamics 365

Workflows in Dynamics 365 can be used to send emails and even send on behalf of another user. This is used in our organization to notify teams about actions needed on their records via automatic or on-demand workflows. When you are adding this functionality, there are a few settings to keep in mind.

Setting up Workflow to Send Email

Create your workflow based on your business logic. Inside this process you can include a "Send Email" step with the details you want to be communicated. By default this would send from the workflow owner (or trigger user if run on-demand) but sometimes you want this to be from a specific user. So populate the from information with a user or dynamic reference to the user you want it sent from.

Workflow Owner Permissions

If sending from another user, the workflow owner needs to have access to Send on Behalf of another user. 

On a Security Role this is on the Business Management Tab under Miscellaneous Privileges as "Send Email as Another User". This is included in the System Administrator and System Customizer Roles by default.


Miscellaneous Privileges on Business Management Tab

Outgoing Mail Options

Now you have to make sure that these emails actually go out! If you are using CRM for Outlook, these emails will only send when Outlook is open and running. So this is a good opportunity to use Server Side Sync. You can turn this on just for Outgoing email if you are not ready to use for everything.

Personal User Settings

Last step is to ensure you have permissions to send as that user. So the user's personal settings need to be updated to allow others to send email on their behalf. This can be done with XrmToolBox using the User Settings Utility. 


  1. Launch XrmToolBox and connect to your organization
  2. Open the User Settings Utility
  3. Click "Load Users and Settings" to pull in users from your organization
    1. You can also select a view for the users to limit the list you are looking at. This can be helpful if all users for a team need to start having emails sent.
  4. Select the users you want to edit
  5. Under "Email Settings" change "Allow emails on my behalf" to "Yes"
  6. Click "Update User(s) Settings" in the tool bar

XrmToolBox User Settings Utility Settings

I hope this helps automate automate your processes!

Monday, December 3, 2018

Managing Users in Dynamics 365

In a recent CRMUGDC meeting Jim Novak talked about creating a new XrmToolBox tool to see users with a specific security role. This will be a helpful tool when it is ready for public use. In the mean time, you can also use Advanced Find for this.

Here are some tools I use to manage my user access inside of Dynamics 365.

Advanced Find for Users with a Specific Role

You can build an Advanced Find like the one below to see users with a specific Security Role. Keep in mind you cannot look for a Security Role lookup as there is a new copy of the role for each business unit. Instead you can search that the name equals the name of the role name.




In my organization, we use this method to check users with System Administrator and Customizer so we can quickly check users who have elevated access. This can be used if you have a dedicated role for other permissions such as Export to Excel. Just keep in mind that System Administrator will always have that access as well.



Advanced Find for Team Membership

I also use Advanced Find to check users in a specific team. This can be a bit faster to check than opening the team. Additionally, this allows me to view from the User list if I need to perform actions on the whole team (ex. add Security Roles).


This can be especially helpful if you also use Field Level Security. If you have FLS turned on for a specific sensitive field and have a team added to that profile, you may want to review those users quickly.



Dashboards

The next step can be to put these views together in a dashboard. Then in a few clicks you can quickly see all this data in one place. This also could allow you to grant non-administrator users access to see this data and provide feedback. Don't forget to share the dashboard and all the views if you are using a personal dashboard.


Report: User Summary

This report is a good tool provided out of the box. It will show you all Security Roles for users by Business Unit. This can be done for all users or for just a selected group (maybe from your Advanced Finds above!). I use this to save current state information in case it is needed later.


XrmToolBox Tools for User Management

While Jim is still finishing off his tool, there are some other tools already available that you can take a look at to see if they meet your needs.


  • Access Checker - Select the entity in question, a specific record, and the user then the tool will show you what rights that user had specifically
  • User Roles Manager - add or remove roles in bulk. This can be done for all users or based on a view. I have used this to create a view of all users with an existing role and then use the tool to replace this with a new role.
  • User Settings Utility - take a look at this tool if you need to change other non-Security Role setting such as number of records per page, Emails sent on behalf of, etc.
Those are some tools I use for managing our user access. What other methods do you use?