Share via

Getting 410 Gone HTTP response in teams while trying to load an image

Gopinathan , Litika 0 Reputation points
2026-03-27T05:37:24.4366667+00:00

We are using Bot framework SDK for our app in teams. We have our own image hosting service and we are passing that image url in our adaptive card. The images are publically accessible and we have configured the required CSP headers too.

But the images are not loading consistently in the teams client/ teams web... Some images load fine, but others don't. When we check the console/ network logs, we can see Status Code 410 Gone. Not sure how to resolve this as it is not happening to all the images and it is happening intermittently.

Azure AI Bot Service
Azure AI Bot Service

An Azure service that provides an integrated environment for bot development.


3 answers

Sort by: Most helpful
  1. Anshika Varshney 9,735 Reputation points Microsoft External Staff Moderator
    2026-04-05T16:25:08.57+00:00

    Hi Gopinathan , Litika,

    This behavior is not caused by Microsoft Teams or the Bot Framework SDK. A 410 Gone response means the image URL is no longer available from the image hosting service itself, and Teams is simply showing that result.

    When Teams renders an adaptive card, it loads images using Microsoft edge caching and CDN layers. If the image URL points to a resource that later expires, is soft deleted, or is replaced at the origin, Teams may still try to fetch the old URL. When the origin responds with 410 Gone, Teams treats that image as permanently unavailable and stops retrying it. This is why some images load while others fail intermittently.

    First, confirm where the 410 is coming from. Open Teams in a browser, open developer tools, go to the network tab, and check the failed image request. You should see that the 410 response is returned by your image host or CDN, not by Teams. If you are using a CDN or reverse proxy, also check its logs for cache purge or eviction activity.

    Next, review how the image URLs are generated and stored. Image URLs used in adaptive cards must be stable and long lived. If your system generates temporary URLs, rotates blob IDs, or deletes older images after deployment or cleanup jobs, Teams can still reference those older URLs and receive 410 responses. Make sure images remain available for as long as the card can be viewed in Teams.

    Also check any cache or versioning behavior. If you are replacing images during redeployments or purging CDN caches aggressively, Teams may hit a stale cached reference while the origin already removed the file. Keeping older image paths valid or using versioned URLs that never change helps avoid this issue.

    If your service is using 410 for temporary failures, that can also cause problems. A 410 response tells clients that a resource is permanently gone. For temporary issues, returning a server error instead is more appropriate. Only return 410 when the image is intentionally and permanently removed.

    Microsoft guidance for adaptive cards and bot images is that all image URLs must be publicly accessible and reliably available for rendering across clients. You can review this here: https://learn.microsoft.com/microsoftteams/platform/task-modules-and-cards/cards/cards-reference

    In short, the fix is to make sure image URLs are not short lived, not deleted while cards are still active, and not replaced in a way that causes old links to return 410. Once the hosting service consistently returns valid responses for all referenced images, Teams will load them reliably again.

    I Hope this helps. Do let me know if you have any further queries.

    Thankyou!

    0 comments No comments

  2. Yutaka_K_JP 1,655 Reputation points
    2026-03-31T10:16:51.32+00:00

    I think ur 410s come from teams hitting a stale edge shard after ur origin swapped the blob-id… maybe keep that url alive a bit longer and open one raw img in ur browser once, it shows fast if the host dropped it.

    0 comments No comments

  3. Q&A Assist
    2026-03-27T05:37:41.8+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    HTTP status 410 means the requested resource is no longer available at the server and no forwarding address is known. In Microsoft APIs and SDKs this is typically surfaced as a “resource gone” condition.

    In this scenario, the Teams client is trying to load the image URL from the custom hosting service, and that service is intermittently returning 410 for some of those URLs. When that happens, Teams simply cannot display the image.

    Key implications and checks:

    1. Confirm the origin is returning 410
      • In Teams web, open Developer Tools → Network.
      • Filter on the failing image URL and confirm the response status is 410 from the image host (not from Teams).
      • If using a CDN or reverse proxy, check its logs as well.
    2. Understand what 410 means in the app/service
      • 410 is a stronger signal than 404: it explicitly states that the resource used to exist but is now permanently gone.
      • In Microsoft APIs, this is represented as a constant like ResponseCode.ResourceGone = 410, meaning “The requested resource is no longer available.” If the image service is returning 410, the client is expected to stop retrying that URL and treat it as permanently invalid.
    3. Fix the image hosting behavior
      • Ensure the image URLs used in adaptive cards are stable and not short‑lived unless the bot/card is updated with new URLs.
      • If images are generated or stored temporarily, adjust retention so they remain available for as long as the card can be viewed in Teams.
      • If the service uses soft deletes, expirations, or cleanup jobs, verify they are not removing images that are still referenced by cards.
      • If 410 is being used incorrectly (e.g., for transient errors), change the service to return an appropriate status (such as 200 for valid images, 404 if never existed, or 5xx for transient server issues) and only use 410 when the resource is truly permanently removed.
    4. Validate CSP and caching are not masking the issue
      • Since some images load and others do not, and the failing ones show 410, the problem is not CSP or Teams itself but the availability of specific image URLs.
      • Check any cache invalidation or purge logic that might cause certain URLs to be dropped and start returning 410.
    5. Deployment and versioning considerations
      • If image URLs are derived from a versioned path or build artifact, ensure older URLs remain valid after deployments, or update existing cards to point to new URLs.

    Once the image hosting service stops returning 410 for valid image URLs (and keeps them available for the lifetime of the card), Teams will load them consistently.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.