Sync-PnPSharePointUserProfilesFromAzureActiveDirectory: Failed to create sync job. Ensure you're providing users to sync and that the mapping is correct. #4905
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to sync EntraID companyName attribute for certain users to their SharePoint profile "Company Name"-custom property:
Also asked here: #4904
Connect-PnPOnline -Url "https://companyxyz.sharepoint.com/sites/intranet" -ClientId "PnPPowerShellClientIDhere"
$users = Get-PnPAzureADUser -Filter "companyName eq 'CompanyXYZ'"
Sync-PnPSharePointUserProfilesFromAzureActiveDirectory -UserProfilePropertyMapping @{"Company Name"="companyName"} -Users $users -Folder "User Profile Sync"
...and this fails with: Sync-PnPSharePointUserProfilesFromAzureActiveDirectory: Failed to create sync job. Ensure you're providing users to sync and that the mapping is correct.
So I tried it without "-Users $users" and that worked. I don't why it fails with the -Users switch since I can get the users with Get-PnPAzureADUser -Filter "companyName eq 'CompanyXYZ'" and I can save them to a "$users" variable normally.
Beta Was this translation helpful? Give feedback.
All reactions