[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M699NBBVG8WN0QQ3XZN0BZT6":3,"skill-same:01M699NBBVG8WN0QQ3XZN0BZT6":95},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":45,"commitSha":46,"skillDirectory":47,"forksCount":48,"repositoryHtmlUrl":49,"repositoryHomepageUrl":50,"ownerHtmlUrl":51,"ownerBlogUrl":52,"ownerDescription":53,"updatedAt":54,"install":55,"resources":68},"01M699NBBVG8WN0QQ3XZN0BZT6","assign-offline-profile",null,"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.","microsoft\u002Fpower-platform-skills","microsoft","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6154722?v=4","01M698VYDXZ6JW5WH3CRV650R8","Microsoft","01M699JVYJFB75D9JM70BN4H0Q",1149,"MIT","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmobile-apps\u002Fskills\u002Fassign-offline-profile\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"assign offline profile","assign","offline","profile","when","sync","sonnet","false","app","bind","but","mobile","use","edit","write","read","Bash","devices","teams","dataverse","2026-11-10 10:12:30",false,"---\nname: assign-offline-profile\ndescription: 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.\nuser-invocable: false\nallowed-tools: Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion\nmodel: sonnet\n---\n\n**Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}\u002Fshared\u002Fshared-instructions.md)** — read first.\n\n**References:**\n\n- [offline-profile-schema.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Foffline-profile-schema.md) — `usermobileofflineprofilemembership` \u002F `teammobileofflineprofilemembership` entity field map\n- [dataverse-offline-api.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fdataverse-offline-api.md) — Web API recipe (§12 — membership POSTs)\n\n# Assign Offline Profile\n\nBind one or more users and\u002For 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.\n\nPer 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.\n\nBefore project reads or commands, apply\n[app-working-directory.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fapp-working-directory.md).\nResolve one absolute `working_dir` for a direct call or require the child\ninvocation's owner root. Keep every shell\u002Ffile operation, referenced recipe,\nand retry on that root and the selected environment\u002Ftenant; missing or\nconflicting context is `NEEDS_CONTEXT`. File tools use `\u003Cworking_dir>\u002F...`.\nPlanning-phase calls may discover and propose the membership diff but must\nreturn before the confirmation gate, POST\u002FDELETE, or artifact updates.\n\n## Workflow\n\n1. Verify project + locate profile → 2. Pick users\u002Fteams → 3. Discover existing memberships → 4. Confirm diff (single gate) → 5. POST memberships → 6. Verify → 7. Summary\n\n---\n\n### Step 1 — Verify project + locate profile\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nenvironment_id=$(node -p \"require('.\u002Fpower.config.json').environmentId || ''\") || {\n  echo \"BLOCKED: unreadable power.config.json\" >&2; exit 1;\n}\nif [ -z \"$environment_id\" ]; then\n  echo \"NEEDS_CONTEXT: selected app has no environmentId\" >&2; exit 1;\nfi\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fresolve-environment.js\" \"$environment_id\" --no-cache --require-tenant\n```\n\nCapture `\u003CenvUrl>` and `\u003CtenantId>` and require them to match any supplied owner\nidentity. Pass `--tenant-id \"\u003CtenantId>\"` on every Dataverse request, including\nprofile lookup, `WhoAmI`, membership discovery, mutation, readback, and retries.\n\nProfile ID resolution (in order):\n\n| Source | Used when |\n|---|---|\n| `$ARGUMENTS` contains `--profile-id \u003Cguid>` | Explicit override |\n| `$ARGUMENTS` contains `--profile-name \u003Cname>` | Resolve via `GET \u002Fmobileofflineprofiles?$filter=name eq '\u003Cname>'&$select=mobileofflineprofileid` |\n| `\u003Cworking_dir>\u002Foffline-profile.json` | Read top-level `profileId` field |\n| Otherwise | `GET \u002Fmobileofflineprofiles` and present `AskUserQuestion` with the list (max 4 options) |\n\nSTOP if no profile can be resolved. Print: `Run \u002Fsetup-offline-profile first, or pass --profile-id`.\n\n> **`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.\n\n### Step 2 — Pick users\u002Fteams\n\n`$ARGUMENTS` parsing:\n\n| Flag | Effect |\n|---|---|\n| `--user \u003Cupn>` (repeatable) | Add specific user(s) by UPN (`user@domain.com`) |\n| `--team \u003Cname>` (repeatable) | Add specific team(s) by name |\n| `--me` | Add the current Dataverse user from `WhoAmI` \u002F `systemusers(\u003CUserId>)` — useful for solo dev demos |\n| `--all-app-users` | Add every user with **System User** role in the current env (broad; intended for prod rollout — confirm at gate) |\n| `--unassign-user \u003Cupn>` \u002F `--unassign-team \u003Cname>` | Remove an existing membership rather than add |\n\nIf no flags passed, present `AskUserQuestion`:\n\n> **Question**: \"Who should receive this offline profile?\"\n>\n> **Options** (max 4):\n> - `Just me (the current user)` — equivalent to `--me`\n> - `Pick specific users by UPN` — you reply with comma-separated emails in the next message\n> - `Pick a team` — list env's teams and pick one\n> - `All users with System User role` — equivalent to `--all-app-users`; broad scope, confirm at gate\n\nFor pick-users flow: after the choice, print:\n\n> \"Reply with comma-separated UPNs (e.g. `rm1@contoso.com, rm2@contoso.com`)\"\n\nThen read the next user message and parse.\n\n### Step 3 — Discover existing memberships\n\n**Telemetry checkpoint: `discover_offline_profile_memberships`**\n\nFor idempotency:\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\n# Existing user memberships for this profile\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"usermobileofflineprofilememberships?\\$filter=_mobileofflineprofileid_value eq \u003CprofileId>&\\$select=usermobileofflineprofilemembershipid,_systemuserid_value&\\$expand=systemuserid_systemuser(\\$select=domainname)\" \\\n  --tenant-id \"\u003CtenantId>\"\n\n# Existing team memberships for this profile\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"teammobileofflineprofilememberships?\\$filter=_mobileofflineprofileid_value eq \u003CprofileId>&\\$select=teammobileofflineprofilemembershipid,_teamid_value&\\$expand=teamid_team(\\$select=name)\" \\\n  --tenant-id \"\u003CtenantId>\"\n```\n\nBuild the set of `already-bound` UPNs and team names.\n\nFor each candidate user\u002Fteam from Step 2, look up their `systemuserid` \u002F `teamid` (skip if already in `already-bound`):\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"systemusers?\\$filter=domainname eq '\u003Cupn>'&\\$select=systemuserid,fullname,domainname&\\$top=1\" \\\n  --tenant-id \"\u003CtenantId>\"\n\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"teams?\\$filter=name eq '\u003Cteam-name>' and teamtype eq 0&\\$select=teamid,name&\\$top=1\" --tenant-id \"\u003CtenantId>\"\n```\n\n(`teamtype eq 0` excludes Access Teams and Owner Teams — only Manage Teams get profile assignments.)\n\nConstruct three lists:\n- `to_add` — resolved IDs to POST\n- `to_remove` — resolved IDs to DELETE (from `--unassign-*` flags)\n- `not_found` — UPNs\u002Fteam-names that didn't resolve (warn)\n- `already_bound` — skipped no-ops\n\n### Step 4 — Confirm diff (single gate)\n\n**Telemetry checkpoint: `confirm_offline_profile_assignment_diff`**\n\n`AskUserQuestion`:\n\n> **Question header**: `Confirm membership changes`\n>\n> **Question body**:\n>\n> ```\n> Profile: \u003Cname> (\u003CprofileId>)\n>\n> Will ADD:\n>   - User: rahul@contoso.com (Rahul Bansal)\n>   - User: charanma@... (Charan Mahankali)\n>   - Team: Field Service RMs (12 members)\n>\n> Will REMOVE:\n>   (none)\n>\n> Already bound (skipping):\n>   - User: admin@... (no-op)\n>\n> Could not resolve:\n>   - someone@external.com — not in this env's system users\n>\n> Proceed?\n> ```\n>\n> **Options**:\n> - `Proceed`\n> - `Cancel`\n\n### Step 5 — POST memberships\n\n**Telemetry checkpoint: `assign_offline_profile_memberships`**\n\nFor each in `to_add`, POST sequentially (parallel POSTs occasionally return 429):\n\n**User membership:**\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \\\n  \"usermobileofflineprofilememberships\" \\\n  --tenant-id \"\u003CtenantId>\" \\\n  --body '{\n    \"MobileOfflineProfileId@odata.bind\": \"\u002Fmobileofflineprofiles(\u003CprofileId>)\",\n    \"SystemUserId@odata.bind\": \"\u002Fsystemusers(\u003Csystemuserid>)\"\n  }' \\\n  --include-headers\n```\n\nExpected 204 with `OData-EntityId` → capture membership GUID.\n\n**Team membership:**\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \\\n  \"teammobileofflineprofilememberships\" \\\n  --tenant-id \"\u003CtenantId>\" \\\n  --body '{\n    \"MobileOfflineProfileId@odata.bind\": \"\u002Fmobileofflineprofiles(\u003CprofileId>)\",\n    \"TeamId@odata.bind\": \"\u002Fteams(\u003Cteamid>)\"\n  }' \\\n  --include-headers\n```\n\nFor each in `to_remove`, DELETE:\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> DELETE \\\n  \"usermobileofflineprofilememberships(\u003Cmembershipid>)\" --tenant-id \"\u003CtenantId>\"\n```\n\n> **⚠️ 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.\n\n### Step 6 — Verify\n\n**Telemetry checkpoint: `verify_offline_profile_memberships`**\n\nRe-query memberships from Step 3 and assert the diff applied:\n- Every `to_add` now appears in the GET response\n- Every `to_remove` no longer appears\n\nIf the verification disagrees, return `BLOCKED: membership writes did not commit` and print the discrepancy.\n\n### Step 7 — Summary\n\nPrint:\n\n```\n✓ Membership updates applied.\n\n  Profile      : \u003Cname>\n  Total members: \u003CN users + M teams>\n  Added        : \u003Clist>\n  Removed      : \u003Clist>\n  Skipped      : \u003Clist> (already bound)\n\nUsers will receive the profile on their next mobile app sign-in. Existing\nsessions need to sign out + sign in to trigger the profile pull.\n```\n\nUpdate `memory-bank.md` `## Offline profile` block:\n\n```yaml\nmembership:\n  users: [rahul@..., charanma@...]\n  teams: [Field Service RMs]\n  lastAssignedAt: 2026-05-19T...\n```\n\n## Status code (final line)\n\n- `DONE` — every requested add\u002Fremove applied; verify confirmed\n- `DONE_WITH_CONCERNS: \u003Clist>` — some UPNs\u002Fteams could not be resolved, or `--all-app-users` matched 0 users (env may not have the role granted yet)\n- `NEEDS_CONTEXT: \u003Cmissing>` — couldn't determine profileId (no offline-profile.json, no --profile flags, no profiles in env)\n- `BLOCKED: \u003Creason>` — auth failure, profile not found in env, or verification disagreement\n\n## Failure recovery\n\nMemberships are individually committed (no transaction). If Step 5 fails mid-loop:\n- Partially-added memberships remain (visible in env)\n- Re-running with the same arguments is idempotent (Step 3 dedup catches what's already bound)\n- Use `--unassign-*` to undo specific bindings if needed\n","**Shared instructions: [shared-instructions.md](${PLUGIN_ROOT}\u002Fshared\u002Fshared-instructions.md)** — read first.\n\n**References:**\n\n- [offline-profile-schema.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Foffline-profile-schema.md) — `usermobileofflineprofilemembership` \u002F `teammobileofflineprofilemembership` entity field map\n- [dataverse-offline-api.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fdataverse-offline-api.md) — Web API recipe (§12 — membership POSTs)\n\n# Assign Offline Profile\n\nBind one or more users and\u002For 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.\n\nPer 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.\n\nBefore project reads or commands, apply\n[app-working-directory.md](${PLUGIN_ROOT}\u002Fshared\u002Freferences\u002Fapp-working-directory.md).\nResolve one absolute `working_dir` for a direct call or require the child\ninvocation's owner root. Keep every shell\u002Ffile operation, referenced recipe,\nand retry on that root and the selected environment\u002Ftenant; missing or\nconflicting context is `NEEDS_CONTEXT`. File tools use `\u003Cworking_dir>\u002F...`.\nPlanning-phase calls may discover and propose the membership diff but must\nreturn before the confirmation gate, POST\u002FDELETE, or artifact updates.\n\n## Workflow\n\n1. Verify project + locate profile → 2. Pick users\u002Fteams → 3. Discover existing memberships → 4. Confirm diff (single gate) → 5. POST memberships → 6. Verify → 7. Summary\n\n---\n\n### Step 1 — Verify project + locate profile\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nenvironment_id=$(node -p \"require('.\u002Fpower.config.json').environmentId || ''\") || {\n  echo \"BLOCKED: unreadable power.config.json\" >&2; exit 1;\n}\nif [ -z \"$environment_id\" ]; then\n  echo \"NEEDS_CONTEXT: selected app has no environmentId\" >&2; exit 1;\nfi\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fresolve-environment.js\" \"$environment_id\" --no-cache --require-tenant\n```\n\nCapture `\u003CenvUrl>` and `\u003CtenantId>` and require them to match any supplied owner\nidentity. Pass `--tenant-id \"\u003CtenantId>\"` on every Dataverse request, including\nprofile lookup, `WhoAmI`, membership discovery, mutation, readback, and retries.\n\nProfile ID resolution (in order):\n\n| Source | Used when |\n|---|---|\n| `$ARGUMENTS` contains `--profile-id \u003Cguid>` | Explicit override |\n| `$ARGUMENTS` contains `--profile-name \u003Cname>` | Resolve via `GET \u002Fmobileofflineprofiles?$filter=name eq '\u003Cname>'&$select=mobileofflineprofileid` |\n| `\u003Cworking_dir>\u002Foffline-profile.json` | Read top-level `profileId` field |\n| Otherwise | `GET \u002Fmobileofflineprofiles` and present `AskUserQuestion` with the list (max 4 options) |\n\nSTOP if no profile can be resolved. Print: `Run \u002Fsetup-offline-profile first, or pass --profile-id`.\n\n> **`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.\n\n### Step 2 — Pick users\u002Fteams\n\n`$ARGUMENTS` parsing:\n\n| Flag | Effect |\n|---|---|\n| `--user \u003Cupn>` (repeatable) | Add specific user(s) by UPN (`user@domain.com`) |\n| `--team \u003Cname>` (repeatable) | Add specific team(s) by name |\n| `--me` | Add the current Dataverse user from `WhoAmI` \u002F `systemusers(\u003CUserId>)` — useful for solo dev demos |\n| `--all-app-users` | Add every user with **System User** role in the current env (broad; intended for prod rollout — confirm at gate) |\n| `--unassign-user \u003Cupn>` \u002F `--unassign-team \u003Cname>` | Remove an existing membership rather than add |\n\nIf no flags passed, present `AskUserQuestion`:\n\n> **Question**: \"Who should receive this offline profile?\"\n>\n> **Options** (max 4):\n> - `Just me (the current user)` — equivalent to `--me`\n> - `Pick specific users by UPN` — you reply with comma-separated emails in the next message\n> - `Pick a team` — list env's teams and pick one\n> - `All users with System User role` — equivalent to `--all-app-users`; broad scope, confirm at gate\n\nFor pick-users flow: after the choice, print:\n\n> \"Reply with comma-separated UPNs (e.g. `rm1@contoso.com, rm2@contoso.com`)\"\n\nThen read the next user message and parse.\n\n### Step 3 — Discover existing memberships\n\n**Telemetry checkpoint: `discover_offline_profile_memberships`**\n\nFor idempotency:\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\n# Existing user memberships for this profile\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"usermobileofflineprofilememberships?\\$filter=_mobileofflineprofileid_value eq \u003CprofileId>&\\$select=usermobileofflineprofilemembershipid,_systemuserid_value&\\$expand=systemuserid_systemuser(\\$select=domainname)\" \\\n  --tenant-id \"\u003CtenantId>\"\n\n# Existing team memberships for this profile\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"teammobileofflineprofilememberships?\\$filter=_mobileofflineprofileid_value eq \u003CprofileId>&\\$select=teammobileofflineprofilemembershipid,_teamid_value&\\$expand=teamid_team(\\$select=name)\" \\\n  --tenant-id \"\u003CtenantId>\"\n```\n\nBuild the set of `already-bound` UPNs and team names.\n\nFor each candidate user\u002Fteam from Step 2, look up their `systemuserid` \u002F `teamid` (skip if already in `already-bound`):\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"systemusers?\\$filter=domainname eq '\u003Cupn>'&\\$select=systemuserid,fullname,domainname&\\$top=1\" \\\n  --tenant-id \"\u003CtenantId>\"\n\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> GET \\\n  \"teams?\\$filter=name eq '\u003Cteam-name>' and teamtype eq 0&\\$select=teamid,name&\\$top=1\" --tenant-id \"\u003CtenantId>\"\n```\n\n(`teamtype eq 0` excludes Access Teams and Owner Teams — only Manage Teams get profile assignments.)\n\nConstruct three lists:\n- `to_add` — resolved IDs to POST\n- `to_remove` — resolved IDs to DELETE (from `--unassign-*` flags)\n- `not_found` — UPNs\u002Fteam-names that didn't resolve (warn)\n- `already_bound` — skipped no-ops\n\n### Step 4 — Confirm diff (single gate)\n\n**Telemetry checkpoint: `confirm_offline_profile_assignment_diff`**\n\n`AskUserQuestion`:\n\n> **Question header**: `Confirm membership changes`\n>\n> **Question body**:\n>\n> ```\n> Profile: \u003Cname> (\u003CprofileId>)\n>\n> Will ADD:\n>   - User: rahul@contoso.com (Rahul Bansal)\n>   - User: charanma@... (Charan Mahankali)\n>   - Team: Field Service RMs (12 members)\n>\n> Will REMOVE:\n>   (none)\n>\n> Already bound (skipping):\n>   - User: admin@... (no-op)\n>\n> Could not resolve:\n>   - someone@external.com — not in this env's system users\n>\n> Proceed?\n> ```\n>\n> **Options**:\n> - `Proceed`\n> - `Cancel`\n\n### Step 5 — POST memberships\n\n**Telemetry checkpoint: `assign_offline_profile_memberships`**\n\nFor each in `to_add`, POST sequentially (parallel POSTs occasionally return 429):\n\n**User membership:**\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \\\n  \"usermobileofflineprofilememberships\" \\\n  --tenant-id \"\u003CtenantId>\" \\\n  --body '{\n    \"MobileOfflineProfileId@odata.bind\": \"\u002Fmobileofflineprofiles(\u003CprofileId>)\",\n    \"SystemUserId@odata.bind\": \"\u002Fsystemusers(\u003Csystemuserid>)\"\n  }' \\\n  --include-headers\n```\n\nExpected 204 with `OData-EntityId` → capture membership GUID.\n\n**Team membership:**\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> POST \\\n  \"teammobileofflineprofilememberships\" \\\n  --tenant-id \"\u003CtenantId>\" \\\n  --body '{\n    \"MobileOfflineProfileId@odata.bind\": \"\u002Fmobileofflineprofiles(\u003CprofileId>)\",\n    \"TeamId@odata.bind\": \"\u002Fteams(\u003Cteamid>)\"\n  }' \\\n  --include-headers\n```\n\nFor each in `to_remove`, DELETE:\n\n```bash\ncd -- '\u003Cworking_dir>' || { echo \"BLOCKED: cannot enter working_dir\" >&2; exit 1; }\nnode \"${PLUGIN_ROOT}\u002Fscripts\u002Fdataverse-request.js\" \u003CenvUrl> DELETE \\\n  \"usermobileofflineprofilememberships(\u003Cmembershipid>)\" --tenant-id \"\u003CtenantId>\"\n```\n\n> **⚠️ 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.\n\n### Step 6 — Verify\n\n**Telemetry checkpoint: `verify_offline_profile_memberships`**\n\nRe-query memberships from Step 3 and assert the diff applied:\n- Every `to_add` now appears in the GET response\n- Every `to_remove` no longer appears\n\nIf the verification disagrees, return `BLOCKED: membership writes did not commit` and print the discrepancy.\n\n### Step 7 — Summary\n\nPrint:\n\n```\n✓ Membership updates applied.\n\n  Profile      : \u003Cname>\n  Total members: \u003CN users + M teams>\n  Added        : \u003Clist>\n  Removed      : \u003Clist>\n  Skipped      : \u003Clist> (already bound)\n\nUsers will receive the profile on their next mobile app sign-in. Existing\nsessions need to sign out + sign in to trigger the profile pull.\n```\n\nUpdate `memory-bank.md` `## Offline profile` block:\n\n```yaml\nmembership:\n  users: [rahul@..., charanma@...]\n  teams: [Field Service RMs]\n  lastAssignedAt: 2026-05-19T...\n```\n\n## Status code (final line)\n\n- `DONE` — every requested add\u002Fremove applied; verify confirmed\n- `DONE_WITH_CONCERNS: \u003Clist>` — some UPNs\u002Fteams could not be resolved, or `--all-app-users` matched 0 users (env may not have the role granted yet)\n- `NEEDS_CONTEXT: \u003Cmissing>` — couldn't determine profileId (no offline-profile.json, no --profile flags, no profiles in env)\n- `BLOCKED: \u003Creason>` — auth failure, profile not found in env, or verification disagreement\n\n## Failure recovery\n\nMemberships are individually committed (no transaction). If Step 5 fails mid-loop:\n- Partially-added memberships remain (visible in env)\n- Re-running with the same arguments is idempotent (Step 3 dedup catches what's already bound)\n- Use `--unassign-*` to undo specific bindings if needed\n",{"name":5,"model":25,"description":7,"allowed-tools":44,"user-invocable":40},"Read, Edit, Write, Grep, Glob, Bash, AskUserQuestion","main","0a55a88fa2855404029d1e5450faf92878baf763","plugins\u002Fmobile-apps\u002Fskills\u002Fassign-offline-profile",232,"https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills","https:\u002F\u002Fmicrosoft.github.io\u002Fpower-platform-skills\u002F","https:\u002F\u002Fgithub.com\u002Fmicrosoft","https:\u002F\u002Fopensource.microsoft.com","Open source projects and samples from Microsoft","2026-11-14 21:46:39",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add microsoft\u002Fpower-platform-skills --skill assign-offline-profile",{"tool":61,"command":62},"bunx","bunx skills add microsoft\u002Fpower-platform-skills --skill assign-offline-profile",{"tool":64,"command":65},"pnpm","pnpm dlx skills add microsoft\u002Fpower-platform-skills --skill assign-offline-profile","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fmobile-apps\u002Fskills\u002Fassign-offline-profile\u002FSKILL.md",true,[69,75,79,85,91],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},"examples\u002Freminders-cli\u002FPackage.swift","OTHER","其他",259,"https:\u002F\u002Fgithub.com\u002Fmattwag05\u002Fmw-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fmacos-automation\u002Fskills\u002Freminders-automation\u002Fexamples\u002Freminders-cli\u002FPackage.swift",{"path":76,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":77,"sourceHtmlUrl":78},"examples\u002Freminders-cli\u002FSources\u002Fmain.swift",2570,"https:\u002F\u002Fgithub.com\u002Fmattwag05\u002Fmw-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fmacos-automation\u002Fskills\u002Freminders-automation\u002Fexamples\u002Freminders-cli\u002FSources\u002Fmain.swift",{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"examples\u002Freminders-wrapper.ts","SCRIPT","脚本",2202,"https:\u002F\u002Fgithub.com\u002Fmattwag05\u002Fmw-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fmacos-automation\u002Fskills\u002Freminders-automation\u002Fexamples\u002Freminders-wrapper.ts",{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Feventkit-requirements.md","REFERENCE","参考文档",1192,"https:\u002F\u002Fgithub.com\u002Fmattwag05\u002Fmw-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fmacos-automation\u002Fskills\u002Freminders-automation\u002Freferences\u002Feventkit-requirements.md",{"path":92,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Fswift-cli-pattern.md",1062,"https:\u002F\u002Fgithub.com\u002Fmattwag05\u002Fmw-plugins\u002Fblob\u002Fmain\u002Fplugins\u002Fmacos-automation\u002Fskills\u002Freminders-automation\u002Freferences\u002Fswift-cli-pattern.md",[96,104,122,145,163,177],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":103},"01M78JN2BFRRV1J54Q6WKZQ08D","compare-site-configurations","Compare Power Pages site configurations between two environments, such as dev, test and production, or between a local download and the live site, and explain which differences change site behavior. Use when a site works in one environment but not another (for example, works in dev but fails in test), to check configuration drift before promoting or deploying, or to see what changed between two sites. Produces a shareable HTML report and a JSON file that VS Code can import.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fpower-pages\u002Fskills\u002Fcompare-site-configurations\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":39},"01M699WVHX0XN59EPBTTPEKYPG","setup","Use when Process Intelligence needs building, explicit cloud\u002Faccount\u002Fenvironment configuration, sign-in, connection diagnostics, or recovery from an authentication error.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fsetup\u002FSKILL.md",[],[106,111,112,113,114,115,23,116,117,31,35,118,119,120,34,121],"configuration","diagnostics","error","environment","cloud","connection","authentication","recovery","process","sign","intelligence",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":133,"publishedAt":39},"01M699WSR9EX55YY1WD9J22FEG","report-issue","Use when the user wants a Process Intelligence bug-report draft or support summary for a failed operation.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Freport-issue\u002FSKILL.md",[128],{"categoryNo":129,"categoryName":130,"taxonomyType":131,"taxonomyTypeDesc":132},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[134,135,136,137,31,23,138,139,119,140,121,141,142,143,144],"issue","report","report issue","bug-report","operation","draft","bug","summary","user","for","support",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":39},"01M699WR26YQ9Q21KE6MJF5B2G","investigate-process","Use when a broad Process Mining business question, observed pattern or competing explanation needs investigation across analytical perspectives.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Finvestigate-process\u002FSKILL.md",[],[152,119,153,154,31,155,156,23,157,158,159,34,160,161,162],"investigate","investigate process","question","process mining","business","across","perspectives","mining","pattern","investigation","analytical",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":39},"01M699WP9SDG5ZR12P8VYNXKTN","derive-metric","Use when a requested measure is missing, a saved custom metric needs reuse, or an ephemeral formula or derived scalar is needed.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fderive-metric\u002FSKILL.md",[],[170,171,172,173,174,175,31,23,176,34],"metric","derive metric","missing","formula","custom","reuse","saved",{"skillNo":178,"name":179,"nameZh":6,"description":180,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":181,"categories":182,"keywords":183,"publishedAt":39},"01M699WMG5R8P6SMTDAS1TKF9E","compare-cohorts","Use when comparing process cohorts, departments, periods or before-and-after results under matched definitions.","https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002Fpower-platform-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fprocess-intelligence\u002Fskills\u002Fcompare-cohorts\u002FSKILL.md",[],[184,185,31,23,186,119,34],"compare","compare cohorts","results"]