Skip to content

Office365DevOps/uploadalluserphoto

Repository files navigation

Upload all users photo to Office 365

Ares Chen @ 2020-2-8

Prerequisite

  1. Install .NET Core runtime 3.1

  2. Register the Application in Azure Portal

    1. Navigate to the app registration portal with your Office 365 Global administrator account https://portal.azure.com/?l=en.en-us#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps
    2. Click the "New Registeration" button
    3. Type the app name (for example : uploaduserphotos)and leave all other settings by default, then click the "Register" button
    4. Copy and save the clientId and tenantId
    5. Navigate to the "Certificates & secrets" page and click the "New client secret" button
    6. Create a default client secret as below
    7. Copy the secret information immediately because you don't have another chance to see it if you refresh the page or goto another page
    8. Navigate to the "API permissions" page, add an application permission under Microsoft Graph category, the permission is "User.ReadWrite.All" , click the "Add permissions" button
    9. Grant the permission as admin
    10. Now, you've registered an application to run, and you've copied three information including the clientId, tenantId, client secret.
  3. Prepare all the photos into a single directory, please keep each file small than 4MB, and named with the employee's email address and extension with jpg. for example ares@greatchinaoffice365.onmicrosoft.com.jpg

Download and run

  1. You can download the execuable here : uploadalluserphoto.zip
  2. Unzip the file to your local drive, start a command shell, change the current directory to the folder, then run a command as below .\updatealluserphoto.exe -i yourclientId -s yourclientsecret -t yourtenantid -d photodirectory

    Please change these four parameter to your information

  3. Relax and enjoy!

Customization or contribute to the project

  1. If you want to customize the application, please feel free to fork the repository and do you change, build and run whatever you want.
  2. If you have great idea to improve this program, you are welcome to send the pull request to me, and I will check the code, and hopefully your code can merge to the repository.

Feedback

Email : teamscommunity@microsoft.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages