Let us assign the System Customizer role to the user John Denver save it and then remove the same.
Let us check the Audit records generated for it.
We can see 2 records with event Associate Entities and Disassociate Entities with security role name – System Customizer created in the Audit Summary View as shown below.
Here the entity will be Security Role.
Let us assign 2 more roles to the user.
As expected we can see 2 records, with event Associate Entities.
Now let us see what happens when we update the Business Unit of the user. If you remember, assigning a new business unit removes all the existing security roles of the user.
Well this can be controlled now through DoNotRemoveRolesOnChangeBusinessUnit
setting – https://nishantrana.me/2022/01/05/how-to-change-users-business-unit-without-removing-the-security-roles-in-dynamics-365-powerapps-enableownershipacrossbusinessunits-setting/
Here we have changed the business unit of user 2, he had salesperson, system administrator, and system customizer roles assigned.
We can see the business unit change is recorded.
From Audit History of the user record – we can check all the Associate Entities and Disassociate Entities record that will give us the details of the previous Security Roles user was having before the Business Unit change.
Other related Audit articles –
- Audit updates in the platform – https://nishantrana.me/2022/02/02/how-to-delete-audit-data-by-entity-table-date-user-access-and-specify-retention-duration-updates-in-dataverse-dynamics-365-crm/
- RetrieveAttributeChangeHistoryRequest – https://nishantrana.me/2022/01/25/using-retrieveattributechangehistoryrequest-to-get-audit-data-for-an-attribute-dataverse-dynamics-365-crm/
- Export Audit – https://nishantrana.me/2021/05/17/how-to-export-the-audit-history-values-from-dynamics-365/
- Few key points Audit – https://nishantrana.me/2021/08/31/audit-entity-table-few-key-points-dynamics-365-power-apps/
- KingswaySoft to retrieve privileges changes – https://nishantrana.me/2021/05/26/retrieving-security-role-privileges-changes-audit-using-kingswaysofts-dynamics-365-ssis-integration-toolkit/
- Audit Delete event – https://nishantrana.me/2020/04/16/identify-deleted-entity-and-attributes-in-audit-summary-view-dynamics-365/
Hope it helps..