What Is Power Apps Host Object or Host Function?
When building applications in Power Apps, creating a seamless and intuitive user experience is critical. One of the tools that can help achieve this is the Host Object Function. This feature allows you to detect the environment where your app is running—whether it’s a web browser, a mobile device, or Microsoft Teams—and tailor the app’s behavior and appearance accordingly.
Enhancing User Experience with the Host Object
- Combine with Responsive Design: Use the
Host
object along with responsive design features like container controls to make your app adaptable to various screen sizes. - Test Across Environments: Always test your app in all supported environments to ensure consistent performance and functionality.
- Leverage Platform Features: For Teams apps, utilize Teams connectors and APIs to integrate with channels, tabs, and conversations.
- Simplify for Mobile: Use the
Host
object to declutter mobile interfaces by hiding non-essential elements.
Syntax
Host()
This function returns a record with the following properties:

Host().BrowserUserAgent: The ‘Browser User Agent’ text property shows the full user agent string that the browser sends to identify itself while running the app.

Host().OSType: The ‘OS Type’ property shows the name of the operating system the app is running on. It gets this information from the user agent string sent by the browser to Power Apps.

Host().SessionID: The ‘Session ID’ property provides a unique ID (GUID) for the current session. You can share this ID with your administrator when reporting issues.

Host().TenantID: The ‘Tenant ID’ property shows the unique ID (GUID) of the Microsoft Entra tenant linked to the currently logged-in user.

Host().Version: The ‘Version’ property shows the identification and version number of the Power Apps player being used.

Host().OfflineEnabled: The ‘Offline Enabled’ property shows whether the app is running in offline mode in the Power Apps player. If the app doesn’t support offline mode, this property will always be false.

Conclusion
The Host Object Function in Power Apps is a versatile feature that empowers developers to create context-aware applications. By identifying the app’s host environment, you can deliver optimized layouts, improve usability, and integrate platform-specific features.