add-geolocation

Implements native background GPS tracking with Dataverse sync in Power Apps mobile projects.

808|167|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/microsoft/power-platform-skills --skill add-geolocation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-geolocation
Source: https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/skills/add-native/add-geolocation
Command: npx skills add https://github.com/microsoft/power-platform-skills --skill add-geolocation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @microsoft/power-apps-native-bglocation.

What problem does it solve?

Adding continuous background GPS tracking to a Power Apps mobile app requires correct wiring of the native bglocation package, MSAL authentication, and a verified Dataverse target table, which is error-prone when done manually.

Core Features & Use Cases

  • Native Tracking Wrapper: Generates src/native/geolocation.ts, a typed wrapper around geoService and BgLocationClient from @microsoft/power-apps-native-bglocation with structured error results.
  • Dataverse Verification: Checks that the msdyn_locationrecords table and all required msdyn_* columns exist before marking the control usable, reporting BLOCKED or UNVERIFIED states otherwise.
  • Use Case: A field-service app needs to record technician locations in the background and sync them to Dataverse; this skill wires up MSAL-only tracking with durable storage and validates the environment first.

Quick Start

Ask the agent to run /add-native geolocation to add background GPS tracking with Dataverse sync to the current Power Apps mobile project.

Frequently Asked Questions about add-geolocation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add background GPS tracking to a Power Apps mobile app?

Use the /add-native geolocation command, which generates a src/native/geolocation.ts wrapper around BgLocationClient from @microsoft/power-apps-native-bglocation. It verifies the Dataverse target table first, then wires MSAL-authenticated tracking with durable storage.

What Dataverse table does the geolocation control use?

The control uses the fixed msdyn_locationrecords entity set with default msdyn_* columns such as msdyn_latitude, msdyn_longitude, and msdyn_timestamp. The table must already exist; the skill does not create it and reports BLOCKED if it is missing.

Can I use expo-location instead of the native bglocation package?

Yes, but only for a single foreground coordinate read via /add-native location. For continuous or background GPS tracking with durable storage and Dataverse sync, the @microsoft/power-apps-native-bglocation package is required.

Which authentication methods does background location tracking support?

Authentication is MSAL-only. The skill explicitly forbids OneAuth, auth selectors, GeolocationExtension, HostingSDK, PCF, and CordovaV2 bridge paths when configuring the tracking client.

Why does the geolocation setup report BLOCKED or UNVERIFIED?

BLOCKED means the msdyn_locationrecords table or required mapped columns are missing in Dataverse. UNVERIFIED means an auth or environment error prevented the table check, so the control cannot be reported as usable.