Skip to content
Skills Library
Documents & office · Tool integration

share

/share

Shares (or unshares) a Microsoft App with users via `ms app share` / `ms app unshare`. Use when updating app access control.

Licence
MIT
Last repository change
09.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 09.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Shares (or unshares) a Microsoft App with users via `ms app share` / `ms app unshare`. Use when updating app access control.

Original author description

Shares (or unshares) a Microsoft App with users via `ms app share` / `ms app unshare`. Use when updating app access control.

How it works

  1. Workflow
  2. Edge Cases
Original SKILL.md headings · 91 lines, 507 words
SKILL.md preview
---
name: share
description: Shares (or unshares) a Microsoft App with users via `ms app share` / `ms app unshare`. Use when updating app access control.
user-invocable: true
allowed-tools: Read, Grep, Glob, Bash, AskUserQuestion
model: sonnet
---

**📋 Shared Instructions: [shared-instructions.md](${CLAUDE_PLUGIN_ROOT}/shared/shared-instructions.md)** — Cross-cutting concerns. **Always confirm before share/unshare.**

# Share / Unshare

Adds or removes user access to the app in the current directory. The CLI resolves emails via Microsoft Graph; entries that don't resolve are returned as warnings (the RP call still succeeds for the resolved entries).

## Workflow

1. Memory Bank → 2. Verify Project + Env → 3. Mode (share / unshare) → 4. Collect Emails → 5. Confirm → 6. Run → 7. Surface Partial-Success Envelope

---

### Step 1: Check Memory Bank

Read `memory-bank.md` for app slug, GUID, and environment.

### Step 2: Verify Project + Env

```bash
test -f ms.config.json || { echo "Not in a Microsoft App workspace."; exit 1; }
BIN=ms
$BIN auth status                                         # must report the expected UPN
```

### Step 3: Mode

Ask whether the user wants to **share** (add access) or **unshare** (remove access). Default to share unless the prompt obviously indicates removal.

### Step 4: Collect Emails

Accept a comma-separated email list. Validate basic shape (`user@domain`) before passing through; don't try to resolve them yourself — `ms` handles Graph resolution and will return warnings for unresolved entries.

If the user passes Object GUIDs (already-resolved principals), pass them through as-is — the CLI accepts both forms.

### Step 5: Confirm

Show the user exactly what will run, then ask for confirmation:

> "About to **share** `<app-name>` with: `alice@contoso.com, bob@contoso.com`. Confirm?"

Wait for explicit yes. Never auto-proceed — ACL changes affect production users.

### Step 6: Run

**Share:**

```bash
$BIN app share "alice@contoso.com,bob@contoso.com"
```

**Unshare:**

```bash
$BIN app unshare "alice@contoso.com,bob@contoso.com"
```

The command reads the app ID from `ms.config.json`.

### Step 7: Surface Partial-Success Envelope

The CLI returns a JSON envelope with `partialFailure: boolean` and `warnings: []`. When `partialFailure: true`:

- The RP call succeeded — share state is updated for resolved users.
- Warnings list the unresolved entries (typo'd email, account doesn't exist in the tenant, Graph couldn't find them, etc.).

Print warnings verbatim and ask the user whether to re-run with corrected entries:

```
Share completed with warnings:
  - 'bob@contso.com' could not be resolved (Graph returned 404).
  - 'charlie@partner.com' is not a member of this tenant.

Share state updated for: alice@contoso.com (1 of 3 resolved).

Would you like to retry the 2 unresolved entries with corrections?
```

If the user confirms, loop back to Step 4 with the corrected list. Don't retry automatically — typos and tenant-membership issues need human resolution.

---

## Edge Cases

| Situation                                                       | Action                                                                                                         |
| --------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| User passes a single email                                       | Run as-is; the envelope still applies (just with one entry).                                                   |
| User passes a mix of emails and Object GUIDs                     | Pass through as one comma-separated list — the CLI accepts both.                                               |
| `ms app share` returns non-zero (not a partial-failure envelope) | A hard error (auth, env, app-not-found). Surface verbatim and STOP. Do not retry.                              |
| User says "share with everyone"                                  | Decline — there is no "everyone" semantic. Ask for an explicit list.                                            |

Versions

RepositoryScoreLicence
This page · microsoft/managed-apps100MIT
ClickHouse/ClickHouse100Apache-2.0
dtyq/magic100Apache-2.0
spencerneutron/Synapse100MIT
microsoft/Copilot-Managed-Runtime100MIT
rarexlabs/p11-public100MIT
rarexlabs/p11-public100MIT
FYClamityDestiny/vetted90MIT

Database snapshot: 13.11.2026 · package version f8b140116a9f (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100share-link
    Manages tenant-wide share links for a Microsoft App via `ms app share link create`, `ms app share link list`, and `ms app share link revoke`. Use when you want to distribute app access via a URL instead of named principals.
  • 100share-link
    Manages tenant-wide share links for a Microsoft App via `ms app share link create`, `ms app share link list`, and `ms app share link revoke`. Use when you want to distribute app access via a URL instead of named principals.
  • 100grayspar
    Deploys apps to Grayspar and shares them with chosen people, using the grayspar CLI. Use when the user asks to put an app online, deploy, redeploy, share or invite someone to an app, keep an app's data across deploys, set its environment variables, or read its logs on Grayspar.
  • 100key-shares
    Operate and diagnose shares — keys their owners have put into a realm for other people there to consume — the `key_shares` and `key_share_notices` tables and the `/_key-shares` and `/_key-share-notices` routes. Covers share states (`active`, `suspended`) and every suspension…
  • 100linshare
    Share documents through LinShare - send files to people by email (inside or outside the organisation), list or revoke what was shared, list and download files received, ask people to send files, and work with team workgroups and workspaces (browse, upload, download, manage…
  • 95delete-app
    Deletes a Microsoft App via `ms app delete`. Use when the user asks to delete an app; always require explicit confirmation.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.