'How to restrict the application endpoint from loading in a browser?

I am trying to develop a teams messaging extension using ASP.NET core 3.1. The application is hosted on Azure app service. I want the app to be loaded within teams, but not on the browser. Now I'm able to load the application on browser by providing the app url, which must not happen.



Solution 1:[1]

As Suggested by ChetanSharma-msft and as per this Microsoft document we cannot configure we app to restrict message extension.

Here are the few example scenarios where message extensions are used

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 SaiSakethGuduru-MT