TemplateStudio icon indicating copy to clipboard operation
TemplateStudio copied to clipboard

Picture is not downloaded on logon

Open msavazzi opened this issue 4 years ago • 7 comments

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

  • VS Version: 2019
  • WinTS Wizard Version: 3.9.20351.2
  • WinTS Template Version: 3.9.20351.2
  • Windows Build: 20H2 Logon

msavazzi avatar Feb 17 '21 19:02 msavazzi

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

sibille avatar Feb 18 '21 13:02 sibille

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

msavazzi avatar Feb 18 '21 14:02 msavazzi

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.

sibille avatar Feb 18 '21 17:02 sibille

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

msavazzi avatar Feb 19 '21 16:02 msavazzi

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

sibille avatar Mar 05 '21 11:03 sibille

@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

TejendraPrasad avatar Apr 06 '21 21:04 TejendraPrasad

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

sibille avatar Apr 08 '21 05:04 sibille