microsoftgraph / microsoft-graph-toolkit

Authentication Providers and UI components for Microsoft Graph 🦒
https://docs.microsoft.com/graph/toolkit/overview
Other
964 stars 309 forks source link

[BUG] mgt-person does not render the person image using version > v1.1.1 in a SPFx Web Part #397

Closed FranckyC closed 4 years ago

FranckyC commented 4 years ago

I use MGT mgt-person component in a SharePoint SPFx WebPart (1.10.0), inside an Handlebars template (notice the escape \ for {{personImage}}). Here is my basic template:

<mgt-person person-query="{{userEmail}}" person-card="hover">
    <template>
        <my-webcomponent data-image-url="\{{personImage}}"></my-webcomponent>
    </template>
    <template data-type="person-card">
        <mgt-person-card inherit-details>
        </mgt-person-card>
    </template>
</mgt-person>

I use the SharePointProvider in the onInit() method and I've added all the correct permissions for the Microsoft Graph like mentionend in the documentation.

Everything was working fine using version 1.1.1. Using version > 1.1.1, the component does not display image anymore, only initials. I see the REST call is fetching the image correctly, but the component simply does not render it. Same using a simple <mgt-person person-query="{{userEmail}}"/>. Using this code either in React or in an HTML template does the same output.

To Reproduce Steps to reproduce the behavior:

  1. In a SPFx Web Part, use the mgt version > 1.1.1 and the SharePointProvider.
  2. In a React component, use the mgt-person component with a static user <mgt-person person-query="john.doe@contoso.com"/>
  3. The user image does not render.

Expected behavior The user image should render in a React SPFx Web Part.

Screenshots image

Environment (please complete the following information):

ghost commented 4 years ago

Hello FranckyC, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌