Nishant Rana's Weblog


Home | Pages | Archives


How to – Force Sync Users from Azure AD to Dynamics CRM

January 20, 2021 9:30 PM


At times after assigning the appropriate license to the User / adding them to Azure AD Security Group associated with the environment, the users do not appear within CRM, or it takes long time for them to appear.

We can use the PowerShell cmdlet shared in the blog.

The same thing can be achieved using Force Sync User Action within Power Platform for Admins Connector (Preview)

https://docs.microsoft.com/en-us/connectors/powerplatformforadmins/#force-sync-user

We can make use of the template which uses the above action

https://us.flow.microsoft.com/en-us/galleries/public/templates/6e4162ca7afc48479e3ad1caadc6c1e6/force-sync-azure-active-directory-group-members-to-specified-cds-instance/

lastly from Admin Portal, we can also try removing Security Group from the environment, and adding it back, or adding removing the license from the user, which triggers the sync.

If nothing helps the last resort is to raise the Microsoft Support Ticket.

soundharya subhash's avatarPower Platform Learning

When an new Environment is created, it takes more than an hour or some times a day to sync users from Azure AD to CRM.

Through Power Shell cmdlets, we can sync user immediately.

Install Module Microsoft.PowerApps.Administration.PowerShell

Install-Module -Name Microsoft.PowerApps.Administration.PowerShell

Connect to Power Apps using any of these

  • User Name and Password

Add-PowerAppsAccount -Endpoint "prod" -Username "" -Password ""

  • Tenant Id, Client Id and Client Secret

Add-PowerAppsAccount -Endpoint "prod" -TenantID "" -ClientSecret "" `
-ApplicationId ""

  • Tenant Id, Client ID and Certificate Thumbprint 

Add-PowerAppsAccount -Endpoint "prod" -TenantID "" -CertificateThumbprint "" `
-ApplicationId ""

Get-AdminPowerAppEnvironment cmdlet gives list of environments available in Tenant, note down the environment name (guid) to which you want to sync the Users

Go to Azure Portal : https://portal.azure.com -> Azure AD -> Users -> note down the Object Id of the user you want to sync

Run the cmdlet in Power Shell

Add-AdminPowerAppsSyncUser -EnvironmentName <Guid> -PrincipalObjectId…

View original post 30 more words


Discover more from Nishant Rana's Weblog

Subscribe to get the latest posts sent to your email.

Posted by Nishant Rana

Categories: Microsoft Dynamics 365

Tags:

4 Responses to “How to – Force Sync Users from Azure AD to Dynamics CRM”

  1. Hi, thank you for the trick! When troubleshooting user issue, I often do a “Add user” event the user is already in the org https://docs.microsoft.com/en-us/dynamics365/mixed-reality/guides/add-users#:~:text=%2C%20or%20Admin).-,Add%20a%20new%20user,information%20for%20the%20new%20user.

    Liked by 1 person

    By Pierre-Olivier Pujol (@popujol) on January 21, 2021 at 1:15 PM

  2. Hello,

    I was wondering if anyone has an experience with AD Group and Dynamics 365 AAD team. We have a problem with syncing. Is there any way to force sync instead of waiting for sync or user to log in?

    Can we use flow for force sync in that case? Also does anyone have a problem where, let’s say, we have two users that should be synced (with proper BU and licences) but only one is being synced?

    I would be very thankful if you could provide me with any information.

    Best regards,
    DZ

    Like

    By DZ on October 5, 2021 at 3:06 PM

  3. […] https://nishantrana.me/2021/01/20/force-sync-users-from-azure-ad-to-dynamics-crm/ […]

    Like

    By Using Force Sync User to sync PowerApp / CRM users – Power Platform / Dynamics 365 – Nishant Rana's Weblog on December 13, 2021 at 8:07 PM

  4. […] Force Sync Users from Azure AD to Dynamics CRM […]

    Like

    By Using Force Sync User to sync PowerApp / CRM users – Power Platform / Dynamics 365 – Nishant Rana’s Weblog – terencontrer on December 24, 2021 at 8:44 AM

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.