Tutorials/Power Apps/Build a Smart Help Desk Form Using Power Apps Host Object
Power Appsintermediate

Build a Smart Help Desk Form Using Power Apps Host Object

Automatically populate support requests with browser, OS, session and tenant details to speed up diagnosis.

NA
Narmer Abader
@narmer · Published June 3, 2026

When users run into trouble with your Power App, the first thing support needs is context: what browser, what operating system, and which session or tenant they were using. Asking the user to copy and paste this info is unreliable. The Power Apps Host object provides four key properties that you can use to automatically capture the browser user agent, operating system, session ID, and tenant ID. In this article, you will build a self-service help desk form that gathers these details silently and submits them with the user’s issue description.

We will use a SharePoint list as the back-end data store. The same approach works with Dataverse or any other Power Apps‑supported data source. No additional licensing is required; the Host object is available in all canvas apps.

Building the Support Data Store

Create a new SharePoint list and name it SupportTickets. Add the following columns:

Column NameType
DescriptionMultiple lines of text
BrowserAgentSingle line of text
OSVersionSingle line of text
SessionIdSingle line of text
TenantIdSingle line of text

These columns will hold the user’s issue description and the environment details we pull from the Host object.

Creating the Submission Form

Open Power Apps Studio and create a blank canvas app. Add a data source pointing to your SupportTickets list.

Design a form screen with the following controls:

  • A Text input for the description (set its Default property to "" and name it txt_Description).
  • Four Label controls to display the Host properties. Name them lbl_UserAgent, lbl_OS, lbl_Session, and lbl_Tenant.
  • A Button named btn_Submit with the text “Submit”.

Extracting the User‑Agent String

The user‑agent string tells support which browser and version the user is running, along with the underlying device platform.

Set the Text property of your first Host label to:

powerfxBrowser user agent
Host.BrowserUserAgent

Power Apps will display the full user‑agent string, such as Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 …. You can use an online parser to interpret it, but for submission the raw string is enough.

Identifying the Operating System

Knowing the OS helps reproduce issues that appear only on certain platforms.

Set the Text property of the second Host label to:

powerfxOperating system name
Host.OSType

This returns values like "Windows", "iOS", "Android", or "macOS".

Accessing Session and Tenant Identifiers

The session ID is a unique identifier that Microsoft support can use to look up telemetry for a specific user session. The tenant ID identifies your organization’s Azure Active Directory tenant.

Set the Text properties of the third and fourth Host labels to:

powerfxSession ID and Tenant ID
Host.SessionID
powerfxTenant ID
Host.TenantID

Both values are GUIDs. They are read‑only and are refreshed with each session.

Saving the Help Desk Ticket

Add a Submit button and set its OnSelect property to the following code:

powerfxButton OnSelect – Patch to SharePoint
If(
  IsError(
      Patch(
          SupportTickets,
          Defaults(SupportTickets),
          {
              Description: txt_Description.Text,
              BrowserAgent: lbl_UserAgent.Text,
              OSVersion: lbl_OS.Text,
              SessionId: lbl_Session.Text,
              TenantId: lbl_Tenant.Text
          }
      )
  ),
  Notify("The ticket could not be saved. Please try again.", NotificationType.Error),
  Notify("Thank you! Your ticket has been submitted.", NotificationType.Success)
)

Make sure the data source name matches exactly (SupportTickets) and that the column names in the patch match your SharePoint list. The IsError check catches any failure and provides clear feedback to the user.

Best Practices and Security Considerations

  • Data access: The tenant and session IDs reveal your organization’s identity and a user’s session token. Limit permissions to the SharePoint list and consider omitting the session ID unless you actively use it for diagnostics.
  • User‑agent reliability: The user‑agent string can be spoofed by the browser or a proxy. Treat it as a hint, not a forensic guarantee.
  • Offline mode: Host properties are only available when the app is connected to the Power Platform. They will not populate when the app runs offline.

Common Pitfalls

  • Blank labels: If Host.OSType or Host.SessionID appears empty, verify that your Power Apps environment is up to date. Older versions of the platform may not support these properties.
  • Case sensitivity: Property names and column names are case‑sensitive in Power Fx. Write Host.BrowserUserAgent exactly as shown.
  • Patch errors: Double‑check that every column name in the Patch call exists in the SharePoint list and that the data source is correctly added under the Data menu.

Final Thoughts

The Host object is a lightweight, built‑in way to enrich your support forms without asking users to copy and paste technical details. It works across desktop browsers, tablets, and phones. By capturing the user agent, OS, session, and tenant automatically, you give your support team the context they need to resolve issues faster.

References