Import User Profile Properties SharePoint Online

%3CLINGO-SUB%20id%3D%22lingo-sub-133691%22%20slang%3D%22en-US%22%3EImport%20User%20Profile%20Properties%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-133691%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EHello%20all%2C%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EI%20need%20to%20sync%20all%20custom%20properties%20of%20user%20profil%2C%20some%20of%20the%20properties%20are%20done%20by%20AAD%2C%20but%20it's%20never%20appear%20on%20sharepoint%20online%20user%20profile%20properties%2C%20so%20i%20need%20to%20sync%20everything%20and%20finish%20the%20job%20that%20SPO%20can't%20do%20for%20know...(hope%20it%20will%20case%20in%20futur%20%3B))).%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EI%20use%20the%20basic%20API%20to%20queue%20the%20QueueImportProfileProperties%20%3A%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E----part%20of%20the%20script%20that%20you%20easily%20found%20on%20the%20web----%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%24o365%20%3D%20New-Object%20Microsoft.Online.SharePoint.TenantManagement.Office365Tenant(%24ctxImportJob)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%24ctxImportJob.Load(%24o365)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20Type%20of%20user%20identifier%20%5B%22Email%22%2C%20%22CloudId%22%2C%20%22PrincipalName%22%5D%20in%20the%20User%20Profile%20Service%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%24userIdType%3D%5BMicrosoft.Online.SharePoint.TenantManagement.ImportProfilePropertiesUserIdType%5D%3A%3AEmail%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E--------%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%24o365.QueueImportProfileProperties(%24userIdType%2C%20%24userLookupKey%2C%20%24propertyMap%2C%20%24importFileUrl)%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E--------%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EI%20try%20to%20sync%20Local%20AD%20with%20this%20json%20template%20(and%20after%20i%20done%20the%20property%20Mapping...)%3A%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%24ADUsers%20%7C%20Select-Object%20%40%7BLabel%20%3D%20%22IdName%22%3BExpression%20%3D%20%7B%24_.Mail%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20%40%7BLabel%20%3D%20%22LastName%22%3BExpression%20%3D%20%7B%24_.Surname%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20active%20directory%20core%20properties%20sync%20with%20AAD%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20%40%7BLabel%20%3D%20%22FirstName%22%3BExpression%20%3D%20%7B%24_.GivenName%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20active%20directory%20core%20properties%20sync%20with%20AAD%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20%40%7BLabel%20%3D%20%22PreferredName%22%3BExpression%20%3D%20%7B%24_.DisplayName%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20active%20directory%20core%20properties%20sync%20with%20AAD%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22WorkEmail%22%3BExpression%20%3D%20%7B%24_.Mail%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20active%20directory%20core%20properties%20sync%20with%20AAD%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22Department%22%3BExpression%20%3D%20%7B%24_.extensionAttribute10%20%7C%20Get-Department%7D%7D%2C%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20are%20Taxonomic%20Properties%2C%20active%20directory%20core%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20%40%7BLabel%20%3D%20%22JobTitle%22%3BExpression%20%3D%20%7B%24_.extensionAttribute9%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20are%20Taxonomic%20Properties%2C%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20%40%7BLabel%20%3D%20%22Manager%22%3BExpression%20%3D%20%7B%25%7B(Get-AdUser%20%24_.Manager%20-server%20%24DC%20-Properties%20Mail).Mail%7D%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20active%20directory%20core%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22MyProfessionalCommunity%22%3BExpression%20%3D%20%7B%24_.extensionAttribute3%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22WorkPhone%22%3BExpression%20%3D%20%7B%24_.telephoneNumber%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22CellPhone%22%3BExpression%20%3D%20%7B%24_.mobile%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22MyWorkplace%22%3BExpression%20%3D%20%7B%24_.extensionAttribute8%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22Office%22%3BExpression%20%3D%20%7B%24_.physicalDeliveryOfficeName%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20%40%7BLabel%20%3D%20%22Location%22%3BExpression%20%3D%20%7B%24_.l%20%7C%20Get-Location%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20are%20Taxonomic%20Properties%2C%20NOT%20SUPPORTED%20IN%20THE%20CURRENT%20API%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22LegalCountry%22%3BExpression%20%3D%20%7B%24_.co%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22LegalCompany%22%3BExpression%20%3D%20%7B%24_.Company%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22Assistant%22%3BExpression%20%3D%20%7B%24_.assistant%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22HireDate%22%3BExpression%20%3D%20%7B%24_.extensionAttribute4%20%7C%20ConvertTo-USDate%7D%7D%2C%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22PublicSiteRedirect%22%3BExpression%20%3D%20%7B%24_.wWWHomePage%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22CompanyCode%22%3BExpression%20%3D%20%7B%24_.extensionAttribute7%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22EmployeeStatus%22%3BExpression%20%3D%20%7B%24_.extensionAttribute1%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22BusinessSector%22%3BExpression%20%3D%20%7B%24_.extensionAttribute2%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22BusinessDescription%22%3BExpression%20%3D%20%7B%24_.extensionAttribute6%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22JobDescription%22%3BExpression%20%3D%20%7B%24_.extensionAttribute5%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%23%20%40%7BLabel%20%3D%20%22EmployeeLanguage%22%3BExpression%20%3D%20%7B%24_.preferredLanguage%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065452%22%20data-yammer-object%3D%22tag%3A22078792%22%20data-resource-id%3D%2222078792%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23native%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20are%20editable%20by%20user%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22InternalFunction%22%3BExpression%20%3D%20%7B%24_.extensionAttribute14%7D%7D%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3E%40%7BLabel%20%3D%20%22EmployeeNumber%22%3BExpression%20%3D%20%7B%24_.employeeNumber%7D%7D%20%7C%26nbsp%3B%3C%2FSPAN%3E%3CA%20class%3D%22yammer-object%20yj-notification-item--link%22%20dir%3D%22auto%22%20href%3D%22https%3A%2F%2Fwww.yammer.com%2Foffice365partners%2Ftopics%2F27065453%22%20data-yammer-object%3D%22tag%3A22078793%22%20data-resource-id%3D%2222078793%22%20data-resource-model%3D%22tag%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%23custom%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%26gt%3B%26gt%3B%20UPDATE%20with%20AD%20properties%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EConvertTo-Json%20-Compress%20%7C%20Out-File%20%24jsonfile%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EWhen%20i%20try%20to%20sync%20Department%2C%20it's%20failed%20and%20i%20suppose%20it's%20an%20internal%20bug%20or%20i%20need%20to%20do%20something%20special%20to%20set%20the%20value%20in%20a%20special%20format%3F%20but%20what%2C%20it's%20an%20asking%20string%20value...%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3ESharePoint%E2%80%99s%20Online%20User%20Profile%20Properties%26nbsp%3B%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3EGenericError%20System.Data.SqlClient.SqlException%20(0x80131904)%3A%20Violation%20of%20PRIMARY%20KEY%20constraint%20'PK_Profile_SearchUserTable'.%20Cannot%20insert%20duplicate%20key%20in%20object%20'upa.Profile_SearchUserTable'.%20The%20duplicate%20key%20value%20is%20(92381304-82c2-4a79-a525-fd5d14251c12%2C%20************%2C%207294337%2C%2014)%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3EIt's%20like%20that%20Department%20want%20to%20add%20his%20own%20value%20to%20the%20SPS-Department%20term%20set%2C%20is%20it%20right%2C%20but%20why%2C%20i%20don't%20want%20it%20%5E%5E%3F%20just%20need%20to%20set%20a%20string%20value%20%3A)%3C%2Fimg%3E%3C%2FSPAN%3E%3CBR%20%2F%3E%3CA%20class%3D%22linkified%22%20title%3D%22https%3A%2F%2F************-admin.sharepoint.com%2F_layouts%2F15%2Ftenantprofileadmin%2FEditProperty.aspx%3FName%3DDepartment%26amp%3BIsSection%3DFalse%26amp%3BProfileType%3D%26amp%3BApplicationID%22%20href%3D%22https%3A%2F%2F%252A%252A%252A%252A%252A%252A%252A%252A%252A%252A%252A%252A-admin.sharepoint.com%2F_layouts%2F15%2Ftenantprofileadmin%2FEditProperty.aspx%3FName%3DDepartment%26amp%3BIsSection%3DFalse%26amp%3BProfileType%3D%26amp%3BApplicationID%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2F************-admin.sharepoint.com%2F_layouts%2F15%2Ftenantprofileadmin%2FEditProperty.aspx%3FName%3DDepartment%26amp%3BIsSection%3DFalse%26amp%3BProfileType%3D%26amp%3BApplicationID%3C%2FA%3E%3CSPAN%3E%3D%20collapse%3C%2FSPAN%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSPAN%3Eany%20idea%20why%20it's%20not%20working%3F%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-136729%22%20slang%3D%22en-US%22%3ERe%3A%20Import%20User%20Profile%20Properties%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-136729%22%20slang%3D%22en-US%22%3E%3CP%3Ehmmmm%2C%20so...maybe%26nbsp%3B%20the%20person%20who%20manage%20AD%20connect%20forgot%20to%20sync%20this%20property....%20another%20question%2C%20in%20case%20that%20he%20forgot%2C%20can%20we%20sync%20specific%20extension%20property%20from%20AD%20Local%20in%20the%20azure%20AD%20department%20property%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-136717%22%20slang%3D%22en-US%22%3ERe%3A%20Import%20User%20Profile%20Properties%20SharePoint%20Online%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-136717%22%20slang%3D%22en-US%22%3EStrange...if%20Deparment%20property%20is%20filled%20in%20Azure%20AD%2C%20it%20should%20be%20sincronizad%20without%20any%20action%20from%20your%20side%20in%20SPO%20user%20profiles...I%20have%20just%20verified%20this%20on%20a%20customer%20tenant%20and%20it%20works%20in%20this%20way%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

Hello all,

I need to sync all custom properties of user profil, some of the properties are done by AAD, but it's never appear on sharepoint online user profile properties, so i need to sync everything and finish the job that SPO can't do for know...(hope it will case in futur ;))). 

I use the basic API to queue the QueueImportProfileProperties : 
----part of the script that you easily found on the web----
$o365 = New-Object Microsoft.Online.SharePoint.TenantManagement.Office365Tenant($ctxImportJob)
$ctxImportJob.Load($o365)
# Type of user identifier ["Email", "CloudId", "PrincipalName"] in the User Profile Service
$userIdType=[Microsoft.Online.SharePoint.TenantManagement.ImportProfilePropertiesUserIdType]::Email
--------
$o365.QueueImportProfileProperties($userIdType, $userLookupKey, $propertyMap, $importFileUrl);
--------

I try to sync Local AD with this json template (and after i done the property Mapping...):
$ADUsers | Select-Object @{Label = "IdName";Expression = {$_.Mail}}, 
# @{Label = "LastName";Expression = {$_.Surname}}, #native >> active directory core properties sync with AAD
# @{Label = "FirstName";Expression = {$_.GivenName}}, #native >> active directory core properties sync with AAD
# @{Label = "PreferredName";Expression = {$_.DisplayName}}, #native >> active directory core properties sync with AAD
@{Label = "WorkEmail";Expression = {$_.Mail}}, #native >> active directory core properties sync with AAD
@{Label = "Department";Expression = {$_.extensionAttribute10 | Get-Department}},#native >> are Taxonomic Properties, active directory core properties
# @{Label = "JobTitle";Expression = {$_.extensionAttribute9}}, #custom >> are Taxonomic Properties, UPDATE with AD properties
# @{Label = "Manager";Expression = {%{(Get-AdUser $_.Manager -server $DC -Properties Mail).Mail}}}, #native >> active directory core properties
@{Label = "MyProfessionalCommunity";Expression = {$_.extensionAttribute3}}, #custom>> UPDATE with AD properties
@{Label = "WorkPhone";Expression = {$_.telephoneNumber}}, #native >> UPDATE with AD properties
@{Label = "CellPhone";Expression = {$_.mobile}}, #native >> UPDATE with AD properties
@{Label = "MyWorkplace";Expression = {$_.extensionAttribute8}}, #custom >> UPDATE with AD properties
@{Label = "Office";Expression = {$_.physicalDeliveryOfficeName}}, #native >> UPDATE with AD properties
# @{Label = "Location";Expression = {$_.l | Get-Location}}, #native >> are Taxonomic Properties, NOT SUPPORTED IN THE CURRENT API
@{Label = "LegalCountry";Expression = {$_.co}}, #custom >> UPDATE with AD properties
@{Label = "LegalCompany";Expression = {$_.Company}}, #custom >> UPDATE with AD properties
@{Label = "Assistant";Expression = {$_.assistant}}, #native >> UPDATE with AD properties
@{Label = "HireDate";Expression = {$_.extensionAttribute4 | ConvertTo-USDate}},#native >> UPDATE with AD properties
@{Label = "PublicSiteRedirect";Expression = {$_.wWWHomePage}}, #custom >> UPDATE with AD properties 
@{Label = "CompanyCode";Expression = {$_.extensionAttribute7}}, #custom >> UPDATE with AD properties
@{Label = "EmployeeStatus";Expression = {$_.extensionAttribute1}}, #custom >> UPDATE with AD properties
@{Label = "BusinessSector";Expression = {$_.extensionAttribute2}}, #custom >> UPDATE with AD properties 
@{Label = "BusinessDescription";Expression = {$_.extensionAttribute6}}, #custom >> UPDATE with AD properties 
@{Label = "JobDescription";Expression = {$_.extensionAttribute5}}, #custom >> UPDATE with AD properties 
# @{Label = "EmployeeLanguage";Expression = {$_.preferredLanguage}}, #native >> are editable by user
@{Label = "InternalFunction";Expression = {$_.extensionAttribute14}}, #custom >> UPDATE with AD properties
@{Label = "EmployeeNumber";Expression = {$_.employeeNumber}} | #custom >> UPDATE with AD properties
ConvertTo-Json -Compress | Out-File $jsonfile 

When i try to sync Department, it's failed and i suppose it's an internal bug or i need to do something special to set the value in a special format? but what, it's an asking string value...

SharePoint’s Online User Profile Properties 
GenericError System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_Profile_SearchUserTable'. Cannot insert duplicate key in object 'upa.Profile_SearchUserTable'. The duplicate key value is (92381304-82c2-4a79-a525-fd5d14251c12, ************, 7294337, 14)

It's like that Department want to add his own value to the SPS-Department term set, is it right, but why, i don't want it ^^? just need to set a string value :)
https://************-admin.sharepoint.com/_layouts/15/tenantprofileadmin/EditProperty.aspx?Name=Depa...= collapse

any idea why it's not working?

2 Replies
Highlighted
Strange...if Deparment property is filled in Azure AD, it should be sincronizad without any action from your side in SPO user profiles...I have just verified this on a customer tenant and it works in this way
Highlighted

hmmmm, so...maybe  the person who manage AD connect forgot to sync this property.... another question, in case that he forgot, can we sync specific extension property from AD Local in the azure AD department property?