assign-offline-profile
This skill binds users and teams to a Mobile Offline Profile in Dataverse so they receive offline sync on their mobile apps.
Identity proven by GitHub's verified organisation badge (microsoft)
- Agents
- Claude Code
- License
- MIT (permissive)
- Pin
- ca144d2pinned Oct 9, 2026
- Context cost
- about 2,500 tokenswhen the skill loads
- GitHub stars
- 978on microsoft/power-platform-skills
- Scripts
- None found
What it does
“Use when the user needs to bind users or teams to a Mobile Offline Profile so they actually receive offline sync on their devices. Without this, the profile exists in Dataverse but no one's app uses it.”
Generated summary from the skill's own text
This skill binds users and teams to a Mobile Offline Profile in Dataverse so they receive offline sync on their mobile apps. It discovers existing memberships, asks the agent to confirm changes, then creates or removes user and team membership records via Web API calls.
When to use it
- After creating an offline profile, to activate it for specific users or teams
- Rolling out offline sync to a department or all users with a particular role
- Adding new team members to an existing offline profile assignment
When not to
- Before the offline profile itself has been created in Dataverse
- If you only need to view or audit existing profile memberships without making changes
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add microsoft/power-platform-skills --skill assign-offline-profileInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install microsoft/power-platform-skills assign-offline-profile@ca144d29c1665a329ab4b8e14946b2105e7622faInstalls the commit we checked (ca144d2).
Copy by hand
Download the folder at ca144d2 and put it in .claude/skills/assign-offline-profile for Claude Code and in .agents/skills/assign-offline-profile for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Claude Code plugin
/plugin install azure-cosmos-db-assistant@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install azure@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Claude Code plugin
/plugin install azure-sql-developer@claude-plugins-officialThe publisher's plugin in Claude's official marketplace. It may hold more than this skill, and we have not pinned it.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "assign-offline-profile" by Microsoft. Source, pinned to commit ca144d29c1665a329ab4b8e14946b2105e7622fa: https://github.com/microsoft/power-platform-skills/tree/ca144d29c1665a329ab4b8e14946b2105e7622fa/plugins/mobile-apps/skills/assign-offline-profile 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/assign-offline-profile/ for Claude Code and .agents/skills/assign-offline-profile/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/microsoft/assign-offline-profile
SKILL.md at the pin
---
name: assign-offline-profile
description: Use when the user needs to bind users or teams to a Mobile Offline Profile so they actually receive offline sync on their devices. Without this, the profile exists in Dataverse but no one's app uses it.
user-invocable: false
allowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion
model: sonnet
---
**Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}/shared/shared-instructions.md)** — read first.
**References:**
- [offline-profile-schema.md](${PLUGIN_ROOT}/shared/references/offline-profile-schema.md) — `usermobileofflineprofilemembership` / `teammobileofflineprofilemembership` entity field map
- [dataverse-offline-api.md](${PLUGIN_ROOT}/shared/references/dataverse-offline-api.md) — Web API recipe (§12 — membership POSTs)
# Assign Offline Profile
Bind one or more users and/or teams to an existing Mobile Offline Profile. Without this step, the profile exists in Dataverse but is unbound — no one's app actually uses it for offline sync.
Per the maker portal's UX (the "Assign profile to user" dialog under env settings), this is a separate operation from profile creation. Many users hit "I created the profile but offline still doesn't work" — the missing piece is membership.
Before project reads or commands, apply
[app-working-directory.md](${PLUGIN_ROOT}/shared/references/app-working-directory.md).
Resolve one absolute `working_dir` for a direct call or require the child
invocation's owner root. Keep every shell/file operation, referenced recipe,
and retry on that root and the selected environment/tenant; missing or
conflicting context is `NEEDS_CONTEXT`. File tools use `<working_dir>/...`.
Planning-phase calls may discover and propose the membership diff but must
return before the confirmation gate, POST/DELETE, or artifact updates.
## Workflow
1. Verify project + locate profile → 2. Pick users/teams → 3. Discover existing memberships → 4. Confirm diff (single gate) → 5. POST memberships → 6. Verify → 7. Summary
---
### Step 1 — Verify project + locate profile
```bash
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
environment_id=$(node -p "require('./power.config.json').environmentId || ''") || {
echo "BLOCKED: unreadable power.config.json" >&2; exit 1;
}
if [ -z "$environment_id" ]; then
echo "NEEDS_CONTEXT: selected app has no environmentId" >&2; exit 1;
fi
node "${PLUGIN_ROOT}/scripts/resolve-environment.js" "$environment_id" --no-cache --require-tenant
```
Capture `<envUrl>` and `<tenantId>` and require them to match any supplied owner
identity. Pass `--tenant-id "<tenantId>"` on every Dataverse request, including
profile lookup, `WhoAmI`, membership discovery, mutation, readback, and retries.
Profile ID resolution (in order):
| Source | Used when |
|---|---|
| `$ARGUMENTS` contains `--profile-id <guid>` | Explicit override |
| `$ARGUMENTS` contains `--profile-name <name>` | Resolve via `GET /mobileofflineprofiles?$filter=name eq '<name>'&$select=mobileofflineprofileid` |
| `<working_dir>/offline-profile.json` | Read top-level `profileId` field |
| Otherwise | `GET /mobileofflineprofiles` and present `AskUserQuestion` with the list (max 4 options) |
STOP if no profile can be resolved. Print: `Run /setup-offline-profile first, or pass --profile-id`.
> **`power.config.json` is intentionally NOT consulted here.** That file is owned by `pa app init`. The profile ID lives in `offline-profile.json` only.
### Step 2 — Pick users/teams
`$ARGUMENTS` parsing:
| Flag | Effect |
|---|---|
| `--user <upn>` (repeatable) | Add specific user(s) by UPN (`user@domain.com`) |
| `--team <name>` (repeatable) | Add specific team(s) by name |
| `--me` | Add the current Dataverse user from `WhoAmI` / `systemusers(<UserId>)` — useful for solo dev demos |
| `--all-app-users` | Add every user with **System User** role in the current env (broad; intended for prod rollout — confirm at gate) |
| `--unassign-user <upn>` / `--unassign-team <name>` | Remove an existing membership rather than add |
If no flags passed, present `AskUserQuestion`:
> **Question**: "Who should receive this offline profile?"
>
> **Options** (max 4):
> - `Just me (the current user)` — equivalent to `--me`
> - `Pick specific users by UPN` — you reply with comma-separated emails in the next message
> - `Pick a team` — list env's teams and pick one
> - `All users with System User role` — equivalent to `--all-app-users`; broad scope, confirm at gate
For pick-users flow: after the choice, print:
> "Reply with comma-separated UPNs (e.g. `rm1@contoso.com, rm2@contoso.com`)"
Then read the next user message and parse.
### Step 3 — Discover existing memberships
**Telemetry checkpoint: `discover_offline_profile_memberships`**
For idempotency:
```bash
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
# Existing user memberships for this profile
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
"usermobileofflineprofilememberships?\$filter=_mobileofflineprofileid_value eq <profileId>&\$select=usermobileofflineprofilemembershipid,_systemuserid_value&\$expand=systemuserid_systemuser(\$select=domainname)" \
--tenant-id "<tenantId>"
# Existing team memberships for this profile
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
"teammobileofflineprofilememberships?\$filter=_mobileofflineprofileid_value eq <profileId>&\$select=teammobileofflineprofilemembershipid,_teamid_value&\$expand=teamid_team(\$select=name)" \
--tenant-id "<tenantId>"
```
Build the set of `already-bound` UPNs and team names.
For each candidate user/team from Step 2, look up their `systemuserid` / `teamid` (skip if already in `already-bound`):
```bash
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
"systemusers?\$filter=domainname eq '<upn>'&\$select=systemuserid,fullname,domainname&\$top=1" \
--tenant-id "<tenantId>"
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> GET \
"teams?\$filter=name eq '<team-name>' and teamtype eq 0&\$select=teamid,name&\$top=1" --tenant-id "<tenantId>"
```
(`teamtype eq 0` excludes Access Teams and Owner Teams — only Manage Teams get profile assignments.)
Construct three lists:
- `to_add` — resolved IDs to POST
- `to_remove` — resolved IDs to DELETE (from `--unassign-*` flags)
- `not_found` — UPNs/team-names that didn't resolve (warn)
- `already_bound` — skipped no-ops
### Step 4 — Confirm diff (single gate)
**Telemetry checkpoint: `confirm_offline_profile_assignment_diff`**
`AskUserQuestion`:
> **Question header**: `Confirm membership changes`
>
> **Question body**:
>
> ```
> Profile: <name> (<profileId>)
>
> Will ADD:
> - User: rahul@contoso.com (Rahul Bansal)
> - User: charanma@... (Charan Mahankali)
> - Team: Field Service RMs (12 members)
>
> Will REMOVE:
> (none)
>
> Already bound (skipping):
> - User: admin@... (no-op)
>
> Could not resolve:
> - someone@external.com — not in this env's system users
>
> Proceed?
> ```
>
> **Options**:
> - `Proceed`
> - `Cancel`
### Step 5 — POST memberships
**Telemetry checkpoint: `assign_offline_profile_memberships`**
For each in `to_add`, POST sequentially (parallel POSTs occasionally return 429):
**User membership:**
```bash
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
"usermobileofflineprofilememberships" \
--tenant-id "<tenantId>" \
--body '{
"MobileOfflineProfileId@odata.bind": "/mobileofflineprofiles(<profileId>)",
"SystemUserId@odata.bind": "/systemusers(<systemuserid>)"
}' \
--include-headers
```
Expected 204 with `OData-EntityId` → capture membership GUID.
**Team membership:**
```bash
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> POST \
"teammobileofflineprofilememberships" \
--tenant-id "<tenantId>" \
--body '{
"MobileOfflineProfileId@odata.bind": "/mobileofflineprofiles(<profileId>)",
"TeamId@odata.bind": "/teams(<teamid>)"
}' \
--include-headers
```
For each in `to_remove`, DELETE:
```bash
cd -- '<working_dir>' || { echo "BLOCKED: cannot enter working_dir" >&2; exit 1; }
node "${PLUGIN_ROOT}/scripts/dataverse-request.js" <envUrl> DELETE \
"usermobileofflineprofilememberships(<membershipid>)" --tenant-id "<tenantId>"
```
> **⚠️ Duplicate handling:** POSTing a membership that already exists returns `409 Conflict`. The `dataverse-request.js` wrapper's `looksLikeDuplicate` rescue treats this as silent success (the Step 3 dedup should catch most cases first). Re-runs are safe.
### Step 6 — Verify
**Telemetry checkpoint: `verify_offline_profile_memberships`**
Re-query memberships from Step 3 and assert the diff applied:
- Every `to_add` now appears in the GET response
- Every `to_remove` no longer appears
If the verification disagrees, return `BLOCKED: membership writes did not commit` and print the discrepancy.
### Step 7 — Summary
Print:
```
✓ Membership updates applied.
Profile : <name>
Total members: <N users + M teams>
Added : <list>
Removed : <list>
Skipped : <list> (already bound)
Users will receive the profile on their next mobile app sign-in. Existing
sessions need to sign out + sign in to trigger the profile pull.
```
Update `memory-bank.md` `## Offline profile` block:
```yaml
membership:
users: [rahul@..., charanma@...]
teams: [Field Service RMs]
lastAssignedAt: 2026-05-19T...
```
## Status code (final line)
- `DONE` — every requested add/remove applied; verify confirmed
- `DONE_WITH_CONCERNS: <list>` — some UPNs/teams could not be resolved, or `--all-app-users` matched 0 users (env may not have the role granted yet)
- `NEEDS_CONTEXT: <missing>` — couldn't determine profileId (no offline-profile.json, no --profile flags, no profiles in env)
- `BLOCKED: <reason>` — auth failure, profile not found in env, or verification disagreement
## Failure recovery
Memberships are individually committed (no transaction). If Step 5 fails mid-loop:
- Partially-added memberships remain (visible in env)
- Re-running with the same arguments is idempotent (Step 3 dedup catches what's already bound)
- Use `--unassign-*` to undo specific bindings if needed
From microsoft/power-platform-skills at ca144d2, shown as plain text under its license: MIT (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at ca144d2Files
- SKILL.md11 KB · abb413aaffc5
1 file, 11 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at ca144d2More from Microsoft
pull-requests
This skill guides the agent in writing high-quality pull request descriptions following the Agent Framework repository template and in systematically handling…
Claude Code, Codex, Cursor +4 · about 1.5K tokens · pinned 6 days ago
appinsights-instrumentation
This skill provides guidance and reference materials for instrumenting webapps with Azure Application Insights across ASP.NET Core, Node.js, Python, and…
Contains scripts
Claude Code, Codex, Cursor +3 · about 840 tokens · pinned 6 days ago
azure-ai
This skill enables agents to use Azure AI services including Search for full-text and vector queries, Speech for transcription and synthesis, OpenAI for…
Claude Code, Codex, Cursor +4 · about 750 tokens · pinned 6 days ago
azure-diagnostics
The skill diagnoses Azure production issues across App Service, Functions, Container Apps, AKS, VMs, and Messaging services using AppLens, Azure Monitor…
Contains scripts
Claude Code, Codex, Cursor +3 · about 1.6K tokens · pinned 6 days ago
add-camera
This skill generates typed TypeScript wrappers for camera capture and image gallery selection in Power Apps mobile apps using Expo libraries.
Claude Code · about 5.2K tokens · pinned 6 days ago
add-connector
This skill adds Power Platform connectors to Expo/React Native mobile apps by discovering the connector, establishing a connection, generating service files…
Claude Code · about 3.8K tokens · pinned 6 days ago
Related in Mobile
expo-app-intents
This skill adds Apple App Intents to Expo apps, enabling Siri voice commands and Shortcuts automation through Swift declarations that dispatch to JavaScript…
by ExpoOfficial publisher
Claude Code, Codex, Cursor +4 · about 3.6K tokens · pinned 6 days ago
eas-app-stores
This skill configures and executes iOS and Android app builds and store submissions using EAS, Expo's app distribution service.
by ExpoOfficial publisher
Claude Code, Codex, Cursor +3 · about 1.7K tokens · pinned 6 days ago
eas-simulator
Runs a user's app on a remote iOS or Android simulator hosted on EAS cloud infrastructure, accessible from machines without local simulator support like Linux…
by ExpoOfficial publisher
Claude Code, Codex, Cursor +3 · about 6.3K tokens · pinned 6 days ago
eas-update
Configures and publishes over-the-air JavaScript and asset updates using EAS Update and the EAS CLI.
by ExpoOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.3K tokens · pinned 6 days ago
expo-animation
This skill guides building animations in React Native and Expo apps using Reanimated, Gesture Handler, and Expo Router.
by ExpoOfficial publisher
Claude Code, Codex, Cursor +3 · about 4.6K tokens · pinned 6 days ago
expo-app-clip
This skill adds an iOS App Clip target to an Expo project, creating a lightweight app experience invoked from URLs on your domain.
by ExpoOfficial publisher
Claude Code, Codex, Cursor +4 · about 2.3K tokens · pinned 6 days ago