microsoft / TemplateStudio

Template Studio accelerates the creation of new WinUI 3, WPF, and UWP apps using a wizard-based experience.
Other
2.7k stars 461 forks source link

Picture is not downloaded on logon #4081

Open msavazzi opened 3 years ago

msavazzi commented 3 years ago

Describe the bug I've followed all instructions, were able to log in but the Picture is always the default.

To Reproduce Steps to reproduce the behavior:

  1. create new project
  2. create app on Azure AD and copy ApplicationID in appsettings.json identityClientId property
  3. compile and run
  4. click on user or settings and logon

Expected behavior Picture to be downloaded correctly

Screenshots see attached screenshot

Additional context

Applies to the following platforms: UWP WPF WinUI
do not know Yes do not know

System

sibille commented 3 years ago

Thanks for reporting @msavazzi. I'll have a look into this.

msavazzi commented 3 years ago

@sibille let me know if you want me to share my test project, or is there any other way I can help

sibille commented 3 years ago

I've looked into this, and depending on the type of account I can see my photo (Azure AD account) or not (personal account). We're using https://graph.microsoft.com/v1.0/me/photo/$value to obtain the photo. For the personal account I'm getting an error saying ConsumerPhotoIsNotSupported. According to https://github.com/microsoftgraph/msgraph-sdk-dotnet/issues/612 is currently supported on the beta version of the graph.

Could you test with the graph explorer if you get a photo there to see if you're facing the same issue or something else? You can find the graph explorer at https://developer.microsoft.com/en-us/graph/graph-explorer.

msavazzi commented 3 years ago

When I log on on the left I get my picture correctly: imaget but when I run the query I get the error: image

same error if I click the GET my photo in the sample queries

sibille commented 3 years ago

Not sure where the profile picture on the left side comes from.

In the app code we're using the 1.0 graph endpoint, which currently does not support this feature. ETA is being discussed in https://github.com/microsoftgraph/microsoft-graph-docs-contrib/issues/7447

TejendraPrasad commented 3 years ago

@sibille When can we expect Photo API to be added in Graph Endpoint v1.0.... As we have few months until we go Live and we don't want to use Beta.

We are using Application token to get user details by Email.. and we need user photo as well to show in our application.

We still get below error

"code": "ResourceNotFound",

"message": "Resource could not be discovered.",

Thank you! Tej

sibille commented 3 years ago

@TejendraPrasad, sorry, I don't have the ETA. You should ask this question on the graph issue microsoftgraph/microsoft-graph-docs-contrib#7447