SPFx - SharePoint User Profile Property Sync

SUDHARSAN KESAVANARAYANANSharePoint Consultant
CERTIFIED EXPERT
Microsoft MVP Office Dev focussed on Azure services, M365, SharePoint On-Premise & SharePoint Online, Power Automate, Power Apps, LiveTiles
Published:
Using SPFx web part to support the administrator for updating the properties of the SharePoint User which are not auto-updated via sync.

Target Audience

  • Administrators currently maintaining user profiles
  • To give a copy to your Administrator if your profiles aren't synched. 
  • Powershell and Scripts will need to be run
  • This solution doesn't work on local mode
 

Introduction

The SPFx web part described below will help the administrators who are currently maintaining the user profiles in their organization. Not all the properties from Azure sync automatically to SharePoint UPS. This solution will help administrators to synchronize specific properties (default or custom) from Azure or maintained in a separate system directly to SharePoint UPS using property import. Moreover, the web part can be configured to be used by certain users using the SharePoint group.

Features

  • Property Mapping panel provides a flexible and user-friendly way to pick the properties to be synced.
  • Templates can be generated based on the 'Property Mapping'.
  • Templates generated can be downloaded either in CSV or JSON format.
  • User selection allows you to update only the users whose properties are changed or yet to be updated.
  • User selection methodwill allow the admin to update both
    • Manually entered properties or which are maintained in a separate system
    • Properties from Azure AD
  • Bulk Sync will allow the admin to upload the data using the templates generated. They can also use these templates as a base for exporting the data from other systems and then feed them here to update the properties.
  • Access control based on SharePoint Group, not all the users can access the application.
  • Anytime access to the template files generated with different property set and the files uploaded for the bulk update.
  • Separate section to check the status of the property update. Detailed status on each property and also display the overall status.
  • Azure Function to handle the property update. PnPPowershell is used in Azure Function.
  • The application supports SPA. It can be used in MS Teams too.
Note: All the supporting lists were created when the web part is loaded for the first time. Whenever the web part is loaded, the supported lists were checked whether it exists or not.

Properties

  • Select a library to store the templates: A document library to store all the templates generated and also the data files uploaded for bulk sync.
  • Azure Function URL: Azure function URL to run the property update silently.
  • Use Certificate for Azure Function authentication: The video mentioned below to set up Azure Function has different options. This setting will decide whether to use the certificate or stored credentials to communicate with SharePoint.
  • Date format: Date format to be used across the entire application. Used moment.js.
  • SharePoint Groups: Only the users from the configured SharePoint Groups and Site Administrator shall be allowed access.
  • Use page full width: This is used when the web part is added to a site page where it has to use the full width.
Note: Only the Site Administrator is allowed to update the application properties.

Preview



Source Code

The above web-part is shared with the community and is free to use. Please click the below link to see more information, download the code, installation instructions and have fun.

React-SPUPSProperty-Sync


Note :  Azure Function has to be setup for property update. The actual powershell is uploaded in the assets folder. Follow the steps explained in the video by Paolo Pialorsi.

Happy Coding...

 Animated gif - Preview 
0
68 Views
SUDHARSAN KESAVANARAYANANSharePoint Consultant
CERTIFIED EXPERT
Microsoft MVP Office Dev focussed on Azure services, M365, SharePoint On-Premise & SharePoint Online, Power Automate, Power Apps, LiveTiles

Comments (0)

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.

Get access with a 7-day free trial.
You Belong in the World's Smartest IT Community