> For the complete documentation index, see [llms.txt](https://docs.inogic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inogic.com/marketing4dynamics/how-to-guides/how-to-update-the-connected-dynamics-365-user-before-deactivating-or-replacing-an-account.md).

# How to Update the Connected Dynamics 365 User Before Deactivating or Replacing an Account

## **Overview**

Marketing4Dynamics stays connected to Dynamics 365 through a specific user account. Every automated sync between Dynamics 365 and Marketing4Dynamics runs under that one account's identity and permissions.

There are several reasons you may need to change this connected user, including:

* The current connected user's license is being removed, or the account is being deactivated
* A restructuring of admin/service accounts (e.g., moving to a dedicated service account)
* The original connected user is leaving the organization

**If this isn't updated before the old account loses its license or is deactivated, syncing between Dynamics 365 and Mailchimp through Marketing4Dynamics will stop working.** Data will no longer flow between the two systems until a valid, active, licensed user is reconnected; so this should be done proactively, not reactively once the old account is already gone.

## Prerequisites

Before starting, confirm the following:

1. New user identified. You have the credentials/account for the new Dynamics 365 user that will own the connection going forward.
2. Security role parity. The new user must have Dataverse security roles equal to or greater than the current connected user's roles (at minimum, matching whatever role the current connected user holds). Under-provisioning permissions is the most common cause of post-migration sync failures.
3. New user is licensed. If the new user has an active Dynamics 365/Power Automate license before the switch, the connection will fail to authenticate otherwise.

## Steps

1. Navigate to [**Power Apps**](https://make.powerapps.com/) and select the relevant environment.
2. Go to Solutions and open the Default Solution.
3. Locate and open Connection References.<br>

   <figure><img src="/files/VZWrYZbhr43El42Ma47O" alt=""><figcaption></figcaption></figure>
4. Find **Microsoft Dataverse** – **Marketing4Dynamics** and select **Edit**.

<figure><img src="/files/qJPNqUxPWvl0t2PWHDRI" alt=""><figcaption></figcaption></figure>

5. Select **Add new connection.**

<figure><img src="/files/JVwhNu5sXwy9P7JEPbtA" alt=""><figcaption></figcaption></figure>

6. Search for **Microsoft Dataverse** and select the + icon to create a new connection.\
   \
   ![](/files/O79y4hT0Q5gnusEvQ6rY)
7. Choose the authentication type **(OAuth or Service Principal),** enter the details for the new user, and select **Create.**

<figure><img src="/files/SWeefq5dljmFC6boWHGa" alt=""><figcaption></figcaption></figure>

8. Select the newly created connection, then **Save**

<figure><img src="/files/zG7KVtOlOeosYc0U4Ovg" alt=""><figcaption></figcaption></figure>

9. Turn the Marketing4Dynamics Power Automate flows **off**, then back **on**, so they pick up the updated connection reference.

## Post-Switch Verification

Before decommissioning or unlicensing the old connected user, confirm:

* Flows are running without authentication errors under the new connection
* At least one full sync cycle has completed successfully
* No permission-related errors appear in flow run history

Only once these are confirmed should the previous connected user's license be removed or the account deactivated. Removing access before verification can cause sync failures that are difficult to distinguish from normal delays.

## Rollback

If issues occur after the switch, the previous connection reference can be re-selected in step 8 above (provided the old user's license/account has not yet been removed) to restore the prior working state while the issue is investigated.

&#x20;
