Does Microsoft Teams have a embedded web browser? - botframework

my bot sends an Action.OpenUrl button. The documentation states "When invoked, show the given url either by launching it in an external web browser or showing within an embedded web browser". The link I always open external web browser. What is an embedded web browser? does ms Teams have a built-in web browser?

Teams is an Electron app - link, meaning it is a Javascript app running in a web browser (a modified Chromium) in the first place.
Teams v2 will move to Edge WebView, so a different browser. source

Related

VS 2022 Teams App - identify run environment in startup code?

VS 2022 Teams App: in startup code i.e. program.cs I need to identify if the app is running either in Teams or as a standalone web app. This is to properly configure authentication to suit the specific environment before app.Run(), as I need the app to be able to run as either Teams-hosted or standalone web.
For Personal apps, in your manifest you are able to specify a contentUrl, which is the url that is rendered for your app when inside Microsoft Teams, as well as a websiteUrl, which is what will get shown when your app is opened outside of the Teams context (e.g. if the user clicks the button to load the web view, or I think some mobile devices render this by default). See more here.
For a Channel or Chat tab, you have a "Configuration" page that the user sees first - the small popup for configuring your tab, and likewise here you set a contentUrl and a websiteUrl (see more here).
In both these cases, you can actually set the -same- url, but with a different querystring value to indicate to your backend which view it is, and then use that value to do what you need.

How to deal with a redirect in Microsoft Teams Tab

I have a simple MS Teams app which just shows my SPA in a personal tab. The app uses SAML-based SSO and of course it requires to make a redirect to an IdP. This redirect happens in my Chrome browser instead of MS Teams tab.
I am wondering if there is any way of forcing MS Teams to use the same tab/iframe to perform redirect? OS: Windows 10.
Small note: if I open my tab in mobile MS Teams app (Android), redirects happen within the app and everything works as expected and user can be successfully authenticated.
Normal web SAML cannot work by definition in an iframe in Teams tab, it has to follow Teams tab supported auth as of now. Giving few reference that might help: Have a look at Single sign-on support for tabs - Teams | Microsoft Docs and Teams SSO sample

Fallback for missing custom tabs with Xamarin and Azure AD B2C

I followed the sample on Xamarin Authorization with Azure AD B2C
That uses Custom Chrome Tabs (and the Safari equivalent).
I do not find any resources on how to handle the case if no Chrome is installed on the mobile device. I just noticed in emulator, it just raises an error dialog that Chrome must be installed. But I do not want to exclude users from signing in/up that use alternative browsers.
Are there any links/tutorials that cover this (crucial) behavior?
MSAL now suports a fallback using the embedded browser of Android / iOS:
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki/msal-net-2-released#you-can-now-leverage-the-embedded-web-browser-in-xamarinios-and-xamarinandroid
You can now leverage the embedded web browser in Xamarin.iOS and
Xamarin.Android
In the previous versions of MSAL.NET, Xamarin.Android and Xamarin.iOS
used the System web browser interacting with Chrome tabs. This was
great if you wanted to benefit from SSO, but that was not working on
some Android phones which device manufacturers did not provide Chrome,
or if the end user had disabled Chrome. As an app developer, you can
now leverage an embedded browser. To support this, the UIParent class
now has a constructor taking a Boolean to specify if you want to
choose the embedded browser. It also has a static method,
IsSystemWebviewAvailable(), to help you decide if you want to use it.
For instance, on Android: bool useSystemBrowser =
UIParent.IsSystemWebviewAvailable(); App.UIParent = new
UIParent(Xamarin.Forms.Forms.Context as Activity, !useSystemBrowser);
For more details about this possibility see the article in MSAL's
conceptual documentation: https://aka.ms/msal-net-uses-web-browser.
Also the web view implementation might change in the future
You will have to use a different library such as:
AppAuth for Android
"When a Custom Tabs implementation is provided by a browser on the device (for example by Chrome), Custom Tabs are used for authorization requests. Otherwise, the default browser is used as a fallback."
AppAuth for iOS
"iOS 9+ uses the in-app browser tab pattern (via SFSafariViewController), and falls back to the system browser (mobile Safari) on earlier versions."
(Note that Microsoft Authentication Library is consistent with the IETF's Best Current Practice for OAuth 2.0 for Native Apps that:
"... the best current practice is to perform the OAuth authorization request in an external user agent (typically the browser) rather than an embedded user agent (such as one implemented with web-views)."

Firebase web push notification in iframe is only working in firefox

I am using firebase for web push notification it is working perfect when I used it in same domain, but I have only one ssl domain and many non ssl website. So I have plan to use it in iframe and integrate this facility in all my non ssl websites too.
URL is
https://htmlcodeplay.com/notification/notification/index.html?websiteid=3
I have integrate it through iframe like below
<iframe src='https://htmlcodeplay.com/notification/notification/index.html?websiteid=3'></iframe>
I have integrate this lines into my blogger https://allinworld99.blogspot.in. But it is working perfectly in Firefox browser but not in chrome browser. No errors also displayed.
As per this link Does my web application require SSL for Firebase Cloud Messaging for Web to work?. It should not work, but how it is working in firefox browser.
I am not able to find a reference right now, but you want to do
embed a "push notification webpage" inside another via iframe
is blocked by Chrome for security reasons.

Dynamics CRM mobile app - ribbon button to open URL via JavaScript?

In Dynamics CRM 2016 I have some buttons in the ribbon that run javascript which use window.open to launch a new window. This works fine on the web browser in desktop mode, but in the Dynamics CRM mobile app it doesnt work. The documentation says:
Dynamics 365 mobile clients also do not support the window.open
method.
However, Microsoft gives no alternative.
I notice if I add a button in Ribbon Workbench and set the command to "Open URL" and put in a web address, it works fine and opens on the mobile app. The XML is:
<Actions>
<Url Address="http://google.com" WinMode="0" />
</Actions>
I assume that XML then translates into Javascript on the app. I wondered if there is a way of using Javascript to open a URL on the mobile app?
I have tried window.open and location.href to no use. In this case javascript is more ideal as I am passing a bunch of parameters to the URL that arent visible by the options in Ribbon Workbench.
It looks like it is not possible to use JavaScript to open a window on CRM for Mobile. However, have come up with a rough alternative.
Using the parameters available in ribbon workbench it is possible to create an "Open URL" command which passes the OrgName, EntityType and PrimaryID. I send these values to an ASPX page which connects to the CRM web service where I can then get the rest of the values I need, and then from there Response.Redirect to the URL I needed to go to.

Resources