We upgraded a CRM 2016 organization to Dynamics 365/CRM. A plug-in that ran fine in 2016 is no longer working correctly in D365.
The plug-in checks the BusinessUnitId from the plug-in context and changes logic based on the GUID.
The problem is that BusinessUnitId is set to the base organization business unit, not to the calling user's actual business unit.
Example: I have a user who is in Business Unit "West". The top-level business unit id is "Corp". The plug-in is registered to run pre-operation synchronous for the "Calling User". I logged in as the user and performed the action to trigger the plug-in. In the plug-in, I trace-out the user's business unit from the context. The plug-in trace says that the user's business unit is for "Corp", not for "West". I double-checked that the user is assigned to the "West" business unit.
Has anyone else run into this change to how D365/CRM is setting the calling user's BusinessUnitId value?
*This post is locked for comments