microsoftgraph / microsoftgraph/msgraph-sdk-dotnet

Updating photos of all users in Entra ID via Graph API throttles and throws exception

Open
#2,374 20 comments 0 reactions 1 assignee View on GitHub

@petrhollayms is already working on this.

Since Jun 6, 2024.

Needs: Attention :wave: Question: SDK
Dominant language
C#
Stars
789
Forks
264
Avg merge
15h 17m
Merged PRs (30d)
3

Description

My process is as follows:

  • Get all users
  • Loop through users
    • Get user photo
    • Check if hash of photo matches current photo
    • If hash does not match upload current photo
    • Get uploaded photo and save hash

This runs into some arbitrary limit set by Microsoft for Graph calls and the code throws System.Threading.Tasks.TaskCanceledException: The request was canceled due to the configured HttpClient.Timeout of 10 seconds elapsing.
It is not always on the same calls, sometime its on the get photo, sometimes on the set.

I can not find any documentation on how to do this correctly, so it would be really nice for a team member to jump in and help.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.