Power Apps App and Host Objects Explained: How to Detect Device, OS, and Screen Info
- Shane Young

- 2 days ago
- 6 min read
TL;DR: The App and Host objects in Power Apps let you read details about the device your app is running on and what the app is doing. This post explains what each object exposes, including OS type, browser, session, screen size, and theme colors, and shows you when to use them for troubleshooting and responsive design. Nothing earth shattering, just more core skills you need to have.
A question came up in class recently that you have probably hit yourself: how do you make your app behave differently when someone is on an iPhone versus a PC? Maybe you want to open Apple Maps on iOS but send everyone else to a Google Maps link. The answer is the App and Host objects, two built in pieces of Power Apps that quietly hold a ton of useful information about the device, the session, and the app itself.
In this post you will learn what the Host and App objects in Power Apps give you, how to read those values, and the real-world reasons you would reach for them. Most of the time it is either troubleshooting a user issue or making a responsive decision on the fly.
If you would rather watch the full walkthrough, check out the video here: https://youtu.be/e20InQtbHxo
What is the Host object in Power Apps?
The Host object gives you information about the environment your app is running in, returned as simple text strings you can read or compare. To use it, you just type Host. in a property and pick what you want. That is genuinely as complicated as it gets.
Here is what the Host object exposes:
Host.BrowserUserAgent returns the browser user agent string.
Host.OSType tells you the operating system, such as Windows, iOS, Android, or Linux.
Host.SessionID gives you the current session identifier.
Host.TenantID returns your tenant identifier.
Host.AppVersion reports the host version the app is running on.
Host.OfflineEnabled tells you whether offline is enabled.

How do you use the Host object for troubleshooting and device decisions?
There are two everyday uses. The first is troubleshooting. You can add a small button that pops up this information so a user can screenshot it and send it to you. Instead of asking someone whether they are on a phone or a laptop and getting a "I do not know", you can see their device, OS, and version information for yourself.
The second is making decisions. Because the values come back as text, you can compare them and branch your logic. A real example from class last week: a student needed to open Apple Maps when a user was on iOS instead of sending them to the usual Maps link. The fix was to read the OS type or the browser user agent and decide from there. To see this in action, watch the walkthrough.

What about the App.Host object and Host Info? (Two things to ignore)
Two lookalikes trip people up, and for the basic scenario you can ignore both.
There is an App.Host object in the tree on the left. It showed up fairly recently, but it has no usable properties. It is likely facilitating something behind the scenes, so for now there is nothing you can do with it.
There is also HostInfo, used with ShowHostInfo. That one only applies when you have enabled offline, so it is tied to the offline data story and not to grabbing basic device information quickly.
What is the App object in Power Apps?
The App object holds information and settings about the app itself rather than the device. You access it the same way, by typing App. and choosing a property. One small quirk: the first time you type App. it sometimes does not show the properties, so back out and type it a second time and they appear. That looks like a bug, but it is harmless.

The property you will probably use most is App.ActiveScreen, which is the screen the user is currently on. A common pattern is App.ActiveScreen.Name, which a lot of people drop into a header component, so the current screen name always shows at the top of the app.
The App object also exposes things like the Theme and whether the app is in a printing state.

How do you use App width and height for responsive design?
App.Width and App.Height give you the current actual width and height of the app. That is useful in responsive scenarios when you want to know what the user is doing right now. For example, to tell whether the screen is currently horizontal or vertical, you just ask whether height is greater than width or the other way around.
App.MinScreenWidth and App.MinScreenHeight are different. Those are the prespecified responsive size breakpoints you have designed, the points where your layout is meant to shift. If you build on size breakpoints, those are the values tied to that responsive story.
How do you access theme colors with the App object?
You can reach your app theme through the App object too. App.Theme.Colors lets you pull a specific theme color, such as Darker60 or Lighter10, and apply it to a control. Copy that value into a control's Fill and you get the matching theme color, which keeps your app consistent without hardcoding hex values.
What settings live on the App object?
Select the App object in the tree on the left and you will find a set of app wide settings worth knowing about, even if you do not touch them often:
ConfirmExit and its message, so you can force a yes I really meant to close prompt on mobile.
Named Formulas, a feature that adds real performance improvements to your apps.
OnError, your global error handling entry point.
OnStart, functionality that fires before the app loads, plus where you set start screen, theme, and the responsive size breakpoints.
OnMessage, a newer one that is likely related to messages or notifications sent to the app, though it is worth confirming in the docs before you rely on it.
You do not need to memorize every one. The useful habit is to jump in here periodically and remind yourself what is available so you reach for the right tool when a need comes up.
What is the difference between the App and Host objects in Power Apps?
The Host object gives you information about the environment and device, such as OS type, browser user agent, session ID, and host version. The App object gives you information and settings about the app itself, such as the active screen, current width and height, and theme colors.
How do I detect whether a Power Apps user is on iPhone or Android?
Use Host.OSType, which returns values like iOS, Android, Windows, or Linux. Because it comes back as text, you can compare it and branch your logic, for example opening Apple Maps on iOS and a Google Maps link everywhere else.
How do I check if a Power Apps screen is in portrait or landscape?
Compare App.Height and App.Width. If height is greater than width the screen is vertical, and if width is greater than height it is horizontal. These return the current actual dimensions, so they update as the screen changes.
What is the difference between App.Width and App.MinScreenWidth?
App.Width is the current actual width of the app at runtime. App.MinScreenWidth is a prespecified responsive breakpoint you design, used to decide when your layout should shift.
Why does the App.Host object have no properties?
The App.Host object appeared in the tree fairly recently and currently exposes no usable properties. It is likely supporting something behind the scenes, so for now you can safely ignore it.
How do I use my Power Apps theme colors in a formula?
Use App.Theme.Colors followed by the color name, such as Darker60 or Lighter10, and apply it to a control property like Fill. This keeps your colors consistent with the app theme without hardcoding hex values.
Key takeaways
The Host object returns environment details as text, including OSType, BrowserUserAgent, SessionID, TenantID, AppVersion, and OfflineEnabled.
The App object exposes app level information such as ActiveScreen, current Width and Height, theme colors, and app wide settings.
Host values are commonly used for troubleshooting and for conditional logic like opening Apple Maps on iOS versus a Google Maps link elsewhere.
App.Width and App.Height tell you the current screen size, while App.MinScreenWidth and App.MinScreenHeight are your designed responsive breakpoints.
App.ActiveScreen.Name is a popular way to show the current screen name in a header component.
Ignore the App.Host object and Host Info for basic scenarios, since App.Host has no usable properties and Host Info only applies to offline enabled apps.
A practical way to make a Power Apps screen look good is to build the structure yourself, then iterate with an AI tool to polish the design.
Need a hand with Power Platform?
If you want help building solutions like this or taking your Power Platform skills further, the team at PowerApps911 can help. Click the Contact Us button and tell us how we can help! Thanks for reading.



Comments