Closed Wajeed-msft closed 9 months ago
Hi Wajeed-msft! Thank you for bringing this issue to our attention. We will investigate and if we require further information we will reach out in one business day. Please use this link to escalate if you don't get replies.
Best regards, Teams Platform
We will check this at our end, and it is rendering fine on both Teams Web and Teams desktop.
Could you please try with this URL once and let us know if you the same issue - https://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg?
This is still the case on my end in Teams 2.1
@z3019494 - Could you please let us know if you are facing the issue with the URL I shared in above comment?
Could you please try with this URL once and let us know if you the same issue - https://connectorsdemo.azurewebsites.net/images/MSC12_Oscar_002.jpg?
I opened this issue in another section and it was moved here. This issue happens when using URLs from SharePoint, like the profile picture (userphoto.aspx), I've seen it as well with images from the SiteAssets library. If you use a picture hosted in any public CDN it will work.
The picture appears in Teams browser only because of cached content, once refreshing clearing cache the image does not appear. There must be something when trying to access the image in SharePoint being in Teams context.
If it helps for anyone having this issue, as a workaround we download the image in base64 dynamically and send it in our adaptive card using the hostedContents property.
As you rightly said, when you try to load an image within Adaptive Card using sharepoint url in the browser, the user has a signed-in session to SharePoint, but perhaps that's not respected in the Teams client.
Please note that the URL should be a public image link.
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 3 days. It will be closed if no further activity occurs within 3 days of this comment.
Copied bug from: https://github.com/microsoft/AdaptiveCards/issues/8687
Details from original post:
Target Platforms
Other
SDK Version
Adaptive Cards 1.3
Application Name
Microsoft Teams
Problem Description
When adding the user profile picture with url "/_layouts/15/userphoto.aspx" to an adaptive card, it renders in Teams via browser but not in the client app, which returns a 401 Unauthorised.
URL for the image: https://TENANT.sharepoint.com/_layouts/15/userphoto.aspx?size=S&accountname=USER_EMAIL@TENANT.onmicrosoft.com
Screenshots
Teams in browser:
Teams app:
![Screenshot 2023-09-22 154959](https://github.com/microsoft/AdaptiveCards/assets/7807026/ef0e436c-ff28-46d4-b3f1-1880e5692af0)
Card JSON
Sample Code Language
No response
Sample Code
No response---
Document Details
⚠ Do not edit this section.It is required for docs.microsoft.com ➟ GitHub issue linking.