User avatars/profile pics for Microsoft Entra social sign in

Hello, I am trying to implement social sign in with Microsoft Entra.

In the Entra dashboard my App Registration has selected User.Read and User.ReadBasic.All (the latter gives "Allows the app to read a basic set of profile properties of other users in your organization on your behalf. Includes display name, first and last name, email address and photo.")

My better auth config lists the User.ReadBasic.All scope:

    microsoft: {
      clientId: MICROSOFT_CLIENT_ID,
      clientSecret: MICROSOFT_CLIENT_SECRET,
      requireSelectAccount: true,
      scope: ["User.ReadBasic.All"],
    },


But the record inserted into the DB by Better Auth doesn't have a profile photo.

I'd really appreciate some help figuring this out? Thank you!
Solution
So I've partially solved it. I've confirmed scope: ["User.ReadBasic.All"] is correct, but the image doesn't provide the placeholder you see in microsoft apps if an avatar isn't explicitly set.
Was this page helpful?