pnp / sp-dev-fx-aces

Repository for the Microsoft Viva Connections Adaptive Card sample solutions from Microsoft and community.
https://aka.ms/viva/connections/extensibility
MIT License
109 stars 92 forks source link

Displaying blob url in teams mobile client doesnt work #96

Closed harshdamaniahd closed 2 years ago

harshdamaniahd commented 2 years ago

Hi, I am fetching User Profile photo from ms graph

 const client: MSGraphClient = await this.context.msGraphClientFactory
        .getClient("3")
        .then();
      var userPhoto:any = await client
        .api("me/photos/360x360/$value")
        .responseType("blob").get()

      let userPhotoBlob: any = URL.createObjectURL(userPhoto).toString();

and i am trying to display this photo on adaptive card view with image , marked yellow . are there any ways to achieve this image

dcashpeterson commented 2 years ago

@harshdamaniahd you need to set the primary image url with the value you get back from the graph. One note thought, this repo is for issues related to the different ACE samples. If you are having issues getting your code to work the best place to post would be SP-Dev-Docs. That repo has a lot more eyes on it.

harshdamaniahd commented 2 years ago

Thanks @dcashpeterson but the url we get is a blob url and it is not supportted in adaptive card

dcashpeterson commented 2 years ago

@harshdamaniahd you can convert a blob to base64 which is supported but again, if you want specific help SP-Dev-Docs is the best place to ask.