<div align="center">

# 🗝️ SharePoint Vault

*„Zápisky z bojového pole" — Notes from the battlefield.*

**Field-tested scripts, hard-won lessons, and practical guides for SharePoint professionals.**

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
[![PnP.PowerShell](https://img.shields.io/badge/PowerShell-PnP.PowerShell-5391FE?logo=powershell&logoColor=white)](https://pnp.github.io/powershell/)
[![Maintained by EasyPortal 365](https://img.shields.io/badge/maintained%20by-EasyPortal%20365-00CED7)](https://easyportal365.cz/en/)

</div>

---

## Straight from the battlefield

**SharePoint Vault** is a growing library of practical material for people who build on, administer, and troubleshoot SharePoint — Online first, on-premises where noted.

> ⭐ **Saved you an hour?** Star the repo — it is how other SharePoint people find the vault. Every article also has its own permanent link on [sharepointvault.online](https://sharepointvault.online/), ready to paste into a forum answer or a ticket.

It is **not** another copy of Microsoft's documentation. Everything in the vault comes from real projects and real tenants: scripts we actually run, traps we actually fell into, and patterns that survived contact with production.

- 🧰 **Scripts** — PowerShell you can run today, with proper help and safe defaults
- 💥 **Gotchas** — short *symptom → cause → fix* write-ups of the traps that cost us hours, so they cost you minutes
- 🧭 **Guides** — end-to-end walkthroughs that connect the dots (REST, Microsoft Graph, SPFx, search)
- ✂️ **Snippets** — copy-paste fragments: REST calls, CAML, list formatting JSON
- 🔗 **Resources** — a curated shortlist of the tools and sources we actually use

## Vault map

| Section | What you'll find |
|---|---|
| [`scripts/`](scripts/) | PowerShell scripts — reporting, permissions, lists & libraries, cleanup, search |
| [`gotchas/`](gotchas/) | Real-world traps, documented as *symptom → cause → fix* |
| [`guides/`](guides/) | End-to-end guides — REST API, Microsoft Graph, SPFx, search |
| [`course/`](course/) | *SharePoint Online – administrace od A do Z* — full CZ course materials (IT Pro admin) |
| [`talks/`](talks/) | Slide decks from public talks and conferences (CZ) |
| [`snippets/`](snippets/) | Small copy-paste fragments for daily work |
| [`resources/`](resources/) | Curated links — tools, docs, community sources |

Prefer everything on a single page? Browse the 🗂️ **[full vault index](INDEX.md)** — a tree of every item in the repo.

## Fresh from the vault

- [**Admin scripts for the everyday jobs**](scripts/README.md) — permissions, cleanup, list governance and search diagnostics, from the "Everyone" claim hunt to version-history bloat; the writing ones back up before they touch anything
- [**Guide: Search queries that actually work**](guides/search-queries-that-actually-work.md) — practical KQL, managed properties, and the traps between you and useful results
- [**Guide: SharePoint REST vs Microsoft Graph**](guides/sharepoint-rest-vs-microsoft-graph.md) — the decision table we actually use, and where people pick wrong
- [**Stored XSS via SharePoint list content**](gotchas/security/stored-xss-from-list-content.md) — React won't block `javascript:` hrefs; the `safeHref` pattern with the C0-strip that closes the bypass
- [**SPFx in Teams: personal apps need global deployment**](gotchas/spfx/teams-personal-app-needs-global-deploy.md) — the `componentType` crash, the `teams/` icon convention, and the tenant-wide extension twist

## How to use the vault

On [sharepointvault.online](https://sharepointvault.online/) you can [start with a reading path](https://sharepointvault.online/start/) for your role, type a status code or a few words of an error into the [error lookup](https://sharepointvault.online/errors), follow [what's new](https://sharepointvault.online/whats-new) in a feed reader, or pick a longer read [from the blog](https://sharepointvault.online/blog). Here on GitHub, browse the folders above, or search within the repo — every gotcha, guide and snippet carries frontmatter with `tags` and `applies-to` (SharePoint Online / Server), so a repo search like `path:gotchas threshold` usually gets you straight to the answer.

All scripts in the vault:

- are **read-only unless clearly stated otherwise** in their header,
- carry comment-based help — run `Get-Help .\TheScript.ps1 -Full` before first use,
- prefer the official **SharePoint Online Management Shell** — plain admin sign-in, no app registration needed. [PnP.PowerShell](https://pnp.github.io/powershell/) appears only where the official module can't go (list-level and content-level work); those scripts say so in their header and expect **your own Entra app registration** (`-ClientId`).

> ⚠️ **Always review a script before running it against your tenant.** That's not a disclaimer, that's professional hygiene.

## Contributing

Found a trap we haven't documented? Have a script worth sharing? Issues and PRs are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md). The golden rule: **sanitize everything** (no real tenant URLs, GUIDs, or account names).

## Who's behind this

The vault is curated by **[Kamil Juřík](https://easyportal365.cz/en/about/kamil-jurik/)** ([LinkedIn](https://www.linkedin.com/in/kamiljurik/)) — former Microsoft MVP for SharePoint and Microsoft-certified expert, working hands-on with SharePoint since 2001 across dozens of projects, from small intranets to full-blown business platforms. Czech readers may remember his *„Zápisky z bojového pole"* (Notes from the battlefield) — this vault carries that tradition on, in the open.

It is maintained by the team behind [**EasyPortal 365**](https://easyportal365.cz/en/) ([LinkedIn](https://www.linkedin.com/company/easyportal-365)) — a suite of [business apps built natively on SharePoint Online](https://easyportal365.cz/en/apps/). The material here comes straight from our day-to-day product development and consulting work.

## License

[MIT](LICENSE) — use it, fork it, ship it. Attribution appreciated, not required.
