Blog
Apps - The easiest way to determine the OS and browser details of the end user device
If you need to determine the OS and browser of the device that a user is using, this post describes the easiest way to carry out this task
Introducing the Host object
The update to Power Apps introduces a Host object. This is available in all canvas app designers, including Power Apps for Teams and SharePoint integrated forms.
Detecting the end user browser and OS using the Host object
We can now access the Host object from within any formula in Power Apps. This exposes the following 3 properties:
- BrowserUserAgent
- OSType
- SessionID
Here's a screenshot that highlights the values of these properties on a Windows 10 PC whilst in edit mode.
Playing the app on a mobile device using the Android Player reveals the following browser user agent. notice how the BrowserUserAgent contains the word 'PowerApps'.
The BrowserUserAgent string provides the most detail about the browser and device that's hosting the app.
A great place to decipher the BrowserUserAgent string is WhatIsMyBrowser.com. This site contains a database of browser agent strings and also includes an API to lookup device and browser details from an input 'browser user agent' string.
https://www.whatismybrowser.com/guides/the-latest-user-agent/windows