Not Able To Find Profile Photo with Microsoft Graph Training Module

Karl Gardner 195 Reputation points
2024-07-16T00:23:47.84+00:00

Hello, I went through this entire module: https://learn.microsoft.com/en-us/training/modules/msgraph-user-photo-information/1-introduction

and I am getting a 404 response when trying to get the profile photo in Microsoft graph. It shows here that I have a profile photo with my [******@gmail.com] microsoft 365 account:

image

The http request is going through ok with the node.js application. I know this because I have confirmed with dev tools:

image

so I'm unsure why I would be getting back that it is not able to find the profile photo. I have one user in my microsoft entra id:

image

Any reason why it's not finding the profile photo?

Thanks!

Microsoft Security | Microsoft Graph
0 comments No comments
{count} votes

Accepted answer
  1. CarlZhao-MSFT 46,376 Reputation points
    2024-07-16T10:13:10.8533333+00:00

    Hi @Karl Gardner

    Your account is a personal account. If you want to get the original photos of your personal account, you need to log in to the application as your personal account.

    First, configure your application as a multi-tenant application. Then, when authenticating the user, change /{tenant_id} to /common.

    User's image

    Hope this helps.

    If the reply is helpful, please click Accept Answer and kindly upvote it. If you have additional questions about this answer, please click Comment.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.