SkillsReviewed · microsoft

Add Geolocation for Power Apps

Add Geolocation is an internal coding-assistant skill for Power Apps mobile developers adding background GPS tracking, but it requires a preinstalled native package and an existing Dataverse location table. It guides creation or reuse of a TypeScript wrapper around @microsoft/power-apps-native-bglocation with MSAL authentication.

Researched 17 Nov 2026

In short.

Add Geolocation is an internal coding-assistant skill for Power Apps mobile developers who need background GPS tracking, but it depends on an initialized app, a preinstalled native package and a verified Dataverse table. It supplies wrapper code and schema checks for @microsoft/power-apps-native-bglocation, using MSAL authentication and the default msdyn_locationrecords destination. Native storage and upload behavior depend on that package. Shared tooling, package compatibility, device behavior and operating costs are not established by the supplied files.

Researched and written by an AI model and checked by a second AI model. How it works

The selected scope is plugins/mobile-apps/skills/add-native/add-geolocation at revision 3a017729c414d7d0295ad201e2bf29be3304217c. Its supplied manifest contains SKILL.md; the repository-root LICENSE is an accompanying notice outside that folder. Referenced shared documentation, parent skills, scripts, package documentation, native implementation, app files and Dataverse resources are outside the supplied evidence. No code was executed. Build success, schema availability, native behavior, storage durability and synchronization remain unverified.

The overview

Identity

Add Geolocation is the add-geolocation skill in Microsoft's power-platform-skills repository, under plugins/mobile-apps/skills/add-native/add-geolocation. Its source folder is [https://github.com/microsoft/power-platform-skills/tree/main/plugins/mobile-apps/skills/add-native/add-geolocation].

It is an internal helper for /add-native geolocation and related background-location aliases. Its metadata declares user-invocable: false, disable-model-invocation: true and model: sonnet. It is intended to work within the surrounding mobile-apps plugin rather than provide a standalone GPS application.

Assessment

This is a useful fit when a developer already has the expected mobile app template and wants a controlled integration with background location and Dataverse. Its strongest feature is requiring the destination table and columns to exist before treating the integration as usable.

Its scope is narrower than complete mobile geolocation setup: it does not install the package, change native configuration, provision the table or edit screens. Referenced shared instructions and compatibility checks are absent from the supplied files, so the complete integration procedure cannot be established from this folder alone. Runtime behavior is untested.

Who it is for

The intended users are developers working on Power Apps mobile projects that need continuous GPS collection, including while the app is in the background, with location records uploaded to Dataverse.

Developers need enough TypeScript and project knowledge to integrate the wrapper into screens and interpret native-module, permission and tracking failures. Beginners will need help establishing the app template, Dataverse environment and table provisioning. For a single foreground coordinate, the source points to a different helper.

Capabilities

The skill supplies example TypeScript for startTracking, stopTracking, isTracking, getPermissionStatus and getCurrentLocation. These functions return a GeoResult value whose ok field distinguishes success from failure. Failure reasons are NATIVE_MODULE_MISSING, PERMISSION_DENIED and TRACKING_FAILED.

The intended integration combines continuous tracking, native durable storage and Dataverse upload. The wrapper delegates those behaviors to @microsoft/power-apps-native-bglocation; it does not implement storage or upload itself. Optional configuration includes intervalMs, distanceFilterMeters and notification.

Using it

Requirements

The app must already contain app.config.js, power.config.json, package.json and a src directory. Its dependencies must already include @microsoft/power-apps-native-bglocation. The skill stops if these checks fail; it supplies no package version or supported platform matrix.

The configured Dataverse environment must already contain the msdyn_locationrecords entity set. The required default columns are msdyn_locationrecordid, msdyn_appid, msdyn_latitude, msdyn_longitude, msdyn_altitude, msdyn_accuracy, msdyn_heading, msdyn_speed and msdyn_timestamp. Access sufficient to query table and attribute metadata is needed; exact authorization roles are unspecified.

Screens must provide connectionUrl, trackInBackground and persistAcrossRestarts. Authentication is restricted to MSAL. The procedure also relies on the surrounding plugin's environment resolver, Dataverse request script, shared instructions and artifact compatibility reference, none of which is included in the supplied files.

How it works

The example wrapper creates its client with geoService(dataSource, app_id). GeoTrackingTarget derives from DataverseDataSource with authMethod and connectionType omitted; the wrapper supplies AuthMethod.MSAL and ConnectionType.Dataverse. Screens are instructed to import src/native/geolocation.ts rather than the package directly.

A module-level activeClient holds the configured client. The status, permission and current-location functions use that client when available or construct a BgLocationClient otherwise. Exceptions are converted into GeoResult failures using message-pattern matching.

The documented usage relies on the package's default table and field mapping. Screens are instructed not to pass tableName or fieldMap. The skill excludes GeolocationExtension, HostingSDK, PCF, Launch URI and CordovaV2 bridge integration paths.

Setup

The documented entry point is /add-native geolocation. The helper inherits the parent operation's absolute app directory and scope of approval. It first checks the initialized app and package, then resolves the Dataverse environment and verifies the destination table and columns.

Before changing src/native/geolocation.ts, the procedure calls for inspecting existing artifacts and preserving custom code, exports and callers. A compatible wrapper can be reused; changes to an incompatible wrapper must stay within the approved scope.

The prescribed TypeScript check is npx --no-install tsc --noEmit, followed by the shared compatibility contract's final checks. A missing table or mapped column blocks readiness, while an authentication or environment error leaves the target unverified. The table provisioning mechanism and standalone skill installation procedure are not supplied.

Example use

For an app that needs background GPS collection, the documented example constructs a GeoTrackingTarget using connectionUrl set to [https://org.crm.dynamics.com], trackInBackground set to true and persistAcrossRestarts set to false. It then calls startTracking('my-wrap-app', target). The address and app identifier are illustrative values.

The example requests background tracking without requesting persistence across restarts. A screen can inspect the returned ok field and use the wrapper's status, permission, current-location and stop functions. The example has no execution results establishing successful tracking or Dataverse delivery.

Assessment & evidence

Limitations

The helper cannot make an unprepared app usable by itself. It requires the native package and default Dataverse schema in advance, and it does not provide the referenced table provisioning mechanism. Custom destination tables and field mappings are outside its documented usage.

The supplied files do not establish supported operating systems, package versions, GPS accuracy, battery impact, offline durability, restart behavior or upload reliability. Permission-request behavior and user-facing tracking controls depend on the surrounding app and native package.

The schema procedure retrieves attribute types but specifies column-existence checks without a type-by-type compatibility specification. Error classification also relies on broad text patterns, so the returned reason is not proof of the underlying cause. Neither behavior has runtime evidence here.

Design rationale

The table-first sequence appears designed to catch an unusable upload destination before wrapper changes are treated as complete. Centralizing package access in one wrapper also gives screens a consistent result format and fixes the authentication path to MSAL. These are inferences from the instructions and example code, rather than demonstrated improvements.

The source explicitly treats TypeScript success as insufficient: artifact compatibility, the destination table and mapped columns must also be checked. Those checks address integration prerequisites, while actual native tracking and data delivery still require separate runtime evidence.

Alternatives

For one foreground coordinate read, the source explicitly recommends /add-native location using expo-location. Add Geolocation is intended for continuous or background tracking with native storage and Dataverse upload.

The alternative helper's implementation, compatibility and costs are not included. The evidence supports this distinction in intended use, but no measured comparison with other geolocation approaches.

Source evidence

The implementation guidance is preserved at [https://raw.githubusercontent.com/microsoft/power-platform-skills/3a017729c414d7d0295ad201e2bf29be3304217c/plugins/mobile-apps/skills/add-native/add-geolocation/SKILL.md]. This address identifies the exact source revision rather than the changing main branch.

The supplied files contain the selected folder's SKILL.md and the repository-root MIT notice. They do not include the parent /add-native skill, shared instructions, compatibility reference, helper scripts, package README or native package implementation. The available code is illustrative wrapper code, with no execution results, device observations or benchmarks.

Access & freshness

Costs

Operating costs are unknown. The supplied files provide no prices, usage allowances, build charges, assistant charges or Dataverse licensing requirements. The repository license grants software rights, but it does not establish the costs or terms of the native package, app environment or associated services.

Rights and license

The accompanying repository-root LICENSE is the MIT License, with copyright attributed to Microsoft Corporation. It permits use, modification, copying, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions. It disclaims warranties and liability.

The captured notice is available at [https://raw.githubusercontent.com/microsoft/power-platform-skills/3a017729c414d7d0295ad201e2bf29be3304217c/LICENSE]. These files do not establish the separate license or service terms of @microsoft/power-apps-native-bglocation or other dependencies.

Freshness

The source snapshot was captured on 17 November 2026 at 05:55:26 UTC from revision 3a017729c414d7d0295ad201e2bf29be3304217c. The capture timestamp is not a release date.

The supplied evidence provides no skill release number, native package version, compatibility history or subsequent changes. The model metadata says sonnet without a specific model version. Compatibility with a particular current app template, assistant host or native runtime is unknown.

Before adopting it

Obtain the matching mobile-apps plugin context, especially the parent /add-native flow, shared compatibility reference and helper scripts. Establish the required app template and native package version, and identify the table provisioning mechanism if msdyn_locationrecords is absent.

Verify the intended Dataverse environment and all mapped columns before integrating the wrapper. Preserve existing callers, follow the artifact compatibility procedure and complete the prescribed TypeScript check. Separately exercise permission failures, background collection, restart settings and Dataverse delivery on the intended devices before relying on those behaviors. Clarify applicable service and assistant costs.

Evidence for this report

LICENSEnotice · checked 2026-11-17