![]() ![]() Integrate the update process with a SharePoint List Now, we will see how you can integrate a SharePoint list to create a process to update employee birthday based on a specific column value. These are the basic steps for changing an employee's birth and hire date using Microsoft Graph. When everything is finished, all you need to do is close the connection with Microsoft Graph. ![]() Update-MgUser -UserId $userId -BodyParameter $paramsĪfter running the command with the correct information, both dates will be updated according to the dates defined by the IT Admin. # Prepare the body to send the new Birthdate $userId = "UNIQUE IDENTIFIER OF THE USER" To update the birth (or hire) date of an employee, you can use the Update-MgUser command and set the date of each user that we want: As soon as you have accepted all the required consents, you will have the authorization to read/write the information needed. This command prompts you to go to a web page to sign in using your administrator account of your Microsoft 365 environment. # The scopes that will be needed to update the user information You can check the current policy using Get-ExecutionPolicy or update the execution policy using Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserconflicts.Īt this moment you have the SDK installed and imported and are ready to start using the Module.įirst of all, you need to authenticate on the Microsoft Graph and accept the required consent scopes. The PowerShell script execution policy must be set to remote signed or less restrictive.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |