Forum Discussion

dlinncr's avatar
dlinncr
Copper Contributor
Dec 09, 2023

Images in channel's Sharepoint storage not rendering in teams adaptive cards

Hello, we are trying to display images stored in Sharepoint in a teams adaptive card. The image will not display until the user has clicked on the 'files' tab for the channel. It returns with a 401, so Im guessing this initiates some kind of auth process. When they click on the files tab and return to the messages, the images are rendered as expected. We need to have security around our images, so we don't want to store them in another setting that might not have team-level authorization.

Is there any way to make the sharepoint images show without clicking on the files tab first, such as triggering the sharepoint auth process programmatically?

This is the image url format we are using: 
https://myaccount.sharepoint.com/sites/DefaultDirectory/Shared%20Documents%2FGeneral%2Fmy-notifications/2023-12-06T20.png

The other issue is that Sharepoint images do not display in 'New Teams' at all. Is this a known issue with New Teams?

Thank you for your help.

Daniel

7 Replies

  • dlinncr - We tried to repro this issue. But due to some ongoing issue in adaptive card not rendering images, we were not able to test it properly.

     


    Once that issue is fixed, we will again repro it and will provide you updates.

    • dlinncr's avatar
      dlinncr
      Copper Contributor

      Prasad_Das-MSFT 

      Thanks for looking. Please do keep me posted, we have reverted to sending emails to the channel and its not ideal.

      Daniel

      • Prasad_Das-MSFT's avatar
        Prasad_Das-MSFT
        Icon for Microsoft rankMicrosoft

        dlinncr - 

        We got update from engineering team that, this is by design - image requests are not sent with any auth token, which is why we request that all cards images be publicly available. 
        As an alternative, you can convert the image to base64, or upload it to a publicly accessible image repository. 
         
         
         

        Thanks, 

        Prasad Das

        ------------------------------------------------------------------------------------------ 

        If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate. 

Resources