Add Geolocation
Internal implementation skill invoked by /add-native for native background GPS tracking...
Install
npx skills add microsoft/power-platform-skills --skill add-geolocation -g -a claude-code -y- Repository
- microsoft/power-platform-skills1.1k
- Category
- Engineering
- Updated
- 4d ago
- License
- MIT
- Context cost
- Mediumabout 2,399 tokens
- Runs scripts
- No, instructions only
What it does
Internal implementation skill invoked by /add-native for native background GPS tracking with durable storage and Dataverse sync using @microsoft/power-apps-native-bglocation.
Shared instructions: shared-instructions.md - read first.
Working directory: before any project read or command, execute
native-artifact-compatibility.md Step 0.
Inherit /add-native's resolved absolute working_dir; bind every shell call and
file tool to it, even when this helper starts from another directory.
Add Geolocation
Internal helper for /add-native geolocation, /add-native location-tracking, /add-native background-location, /add-native gps-tracking, and /add-native @microsoft/power-apps-native-bglocation.
Use this only for continuous/background GPS tracking with native durable storage and inline Dataverse upload. For a single foreground coordinate read, use /add-native location (expo-location) instead.
Hard rules:
- Auth is MSAL-only. Do not expose OneAuth or an auth selector.
- Use
geoService(dataSource, app_id)andBgLocationClient. - Do not use
GeolocationExtension, HostingSDK, PCF, Launch URI, or CordovaV2 bridge paths. - Do not install packages or edit native config.
- The control is not usable until its Dataverse target table and mapped columns are verified.
1. Verify app and package
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
test -f app.config.js && test -f power.config.json && test -f package.json && test -d src || { echo "BLOCKED: working_dir is not an initialized app" >&2; exit 1; }
node -e "const p=require('./package.json'); const m='@microsoft/power-apps-native-bglocation'; if (!p.dependencies?.[m]) { console.error('MISSING: ' + m); process.exit(1); } console.log('OK: geolocation package present');"
If either check fails, stop. The template/app must already ship the native package.
2. Verify the Dataverse target table first
This control uses the package default Dataverse entity set:
