SPFx Entwicklung und Deployment SPFx Development and Deployment
Praxisreferenz für SharePoint Framework Architektur, Generator, Gulp, API-Berechtigungen, Teams-Integration, Deployment und Performance. Practical reference for SharePoint Framework architecture, generator, gulp, API permissions, Teams integration, deployment, and performance.
Ein SPFx-Projekt ist nicht nur TypeScript-Code. Erfolgreiche Lösungen planen Hosting, Paketversionen, API-Berechtigungen, App Catalogs, Tenant Deployment und Betriebsmodell von Beginn an mit ein. An SPFx project is not just TypeScript code. Successful solutions plan hosting, package versions, API permissions, app catalogs, tenant deployment, and the operating model from the start.
SPFx liefert Web Parts, Extensions und Adaptive Card Extensions als clientseitiges Paketmodell für Microsoft 365. SPFx delivers web parts, extensions, and adaptive card extensions as a client-side package model for Microsoft 365.
Der Generator legt Lösungsmetadaten und Komponententypen fest; Gulp steuert Build, Bundle, Serve, Test und Packaging. The generator defines solution metadata and component types; gulp controls build, bundle, serve, test, and packaging.
AadHttpClient, Graph-Scopes, App Catalogs und Asset-Hosting müssen als zusammenhängender Deploymentpfad geplant werden. AadHttpClient, Graph scopes, app catalogs, and asset hosting must be planned as one coherent deployment path.
SPFx-Komponenten können in SharePoint, Viva Connections und Microsoft Teams eingebettet werden. SPFx components can be embedded in SharePoint, Viva Connections, and Microsoft Teams.
Saubere Versionsführung, sparsame Bundles und gezielte Telemetrie sind entscheidend für langlebige SPFx-Lösungen. Clean versioning, lean bundles, and targeted telemetry are key for durable SPFx solutions.
PnP PowerShell eignet sich für wiederholbare App-Uploads, Version-Checks und post-deployment Konfiguration. PnP PowerShell is useful for repeatable app uploads, version checks, and post-deployment configuration.
Architektur, Runtime und Lösungstypen Architecture, runtime, and solution types
Das SharePoint Framework läuft vollständig clientseitig und nutzt moderne Web-Toolchains. Lösungen werden als .sppkg paketiert, im App Catalog hochgeladen und anschließend auf Sites oder tenantweit bereitgestellt. Die Runtime basiert auf manifestgesteuerten Komponenten und nutzt standardisierte Loader, Property Panes und API-Clients wie MSGraphClientFactory oder AadHttpClient. SharePoint Framework runs fully client-side and uses modern web toolchains. Solutions are packaged as .sppkg files, uploaded to an app catalog, and then deployed to sites or tenant-wide. The runtime is based on manifest-driven components and uses standardized loaders, property panes, and API clients such as MSGraphClientFactory or AadHttpClient.
Zu den wichtigsten Komponententypen gehören Web Parts, Field Customizers, Command Sets, Application Customizers und Adaptive Card Extensions für Viva Connections. Jede Komponente bringt unterschiedliche Lebenszyklen, Hostkontexte und Performanceprofile mit. The main component types are web parts, field customizers, command sets, application customizers, and adaptive card extensions for Viva Connections. Each component brings different lifecycle hooks, host contexts, and performance profiles.
SPFx-Komponenten SPFx components
| Typ Type | Einsatz Use case | Hinweis Note |
|---|---|---|
| Web Part Web part | Visuelle Inhalte auf Seiten, Dashboards und Viva Connections. Visual content on pages, dashboards, and Viva Connections. | Standardfall für UI-nahe Fachanwendungen. Default choice for UI-focused business apps. |
| Application Customizer Application customizer | Header-, Footer- oder globale Navigationsanpassungen. Header, footer, or global navigation customization. | Globaler Einfluss, daher besonders governancekritisch. Global impact, therefore governance sensitive. |
| Field Customizer Field customizer | Formatierung und Interaktion in Listen- und Bibliotheksfeldern. Formatting and interaction in list and library fields. | Nützlich für Statusindikatoren und Micro-UX. Useful for status indicators and micro UX. |
| Command Set Command set | Eigene Aktionen in Listen- und Bibliotheksbefehlsleisten. Custom actions in list and library command bars. | Gut für Workflow- oder Exportaktionen. Good for workflow or export actions. |
| Adaptive Card Extension Adaptive Card Extension | Karten und Quick Views für Viva Connections Dashboards. Cards and quick views for Viva Connections dashboards. | Design auf mobile und Dashboard-Szenarien ausrichten. Design for mobile and dashboard scenarios. |
Implementierung Implementation
- Bestandsaufnahme, Rollen und Abhängigkeiten für Architektur, Runtime und Lösungstypen dokumentieren. Document the current state, roles, and dependencies for Architecture, runtime, and solution types.
- Pilotobjekte mit realistischen Daten und Berechtigungen auswählen. Select pilot objects with realistic data and permissions.
- Portaländerungen immer mit PowerShell oder API-Abfragen gegenprüfen. Always validate portal changes with PowerShell or API queries.
- Monitoring, Support-Runbook und Rückfalloptionen vor der Produktion festhalten. Capture monitoring, support runbooks, and rollback options before production rollout.
Betrieb & Hinweise Operations & Notes
- Tenant-Limits, Lizenzzustand und Rollenzuweisungen beeinflussen Architektur, Runtime und Lösungstypen direkt. Tenant limits, license state, and role assignments directly affect Architecture, runtime, and solution types.
- Automatisierung sollte Idempotenz, Logging und Fehlerklassifizierung enthalten. Automation should include idempotency, logging, and error classification.
- Änderungen sollten in Pilotwellen getestet und mit Nutzerkommunikation begleitet werden. Changes should be tested in pilot waves and accompanied by user communication.
- Für Audits lohnt sich eine dokumentierte Soll-Konfiguration mit regelmäßigem Drift-Abgleich. For audits, keep a documented target state and compare for drift regularly.
PowerShell: App Catalog prüfen PowerShell: inspect app catalog
Connect-PnPOnline -Url https://contoso-admin.sharepoint.com -Interactive
Get-PnPTenantAppCatalogUrl
Get-PnPApp
Yeoman Generator, Projektstruktur und alle Gulp-Kommandos Yeoman generator, project structure, and all gulp commands
Der Standardstart erfolgt mit yo @microsoft/sharepoint. Dabei wählen Sie Paketname, Komponententyp, JavaScript-Framework, Umgebung, npm- oder pnpm-Workflow und optional isolierte Domains oder tenantweite Bereitstellung. Eine saubere Struktur mit src, config, gulpfile.js und package-solution.json erleichtert spätere CI/CD-Automatisierung. The standard start is yo @microsoft/sharepoint. You choose package name, component type, JavaScript framework, environment, npm or pnpm workflow, and optionally isolated domains or tenant-wide deployment. A clean structure with src, config, gulpfile.js, and package-solution.json makes later CI/CD automation easier.
Alle zentralen Entwicklungsbefehle laufen über Gulp: clean, build, bundle, package-solution, serve, trust-dev-cert, untrust-dev-cert und test. Für produktionsnahe Bundles sollten Sie immer --ship verwenden; nur dann werden Minifizierung, CDN-Manifeste und releasefähige Pakete erzeugt. All core development commands run through gulp: clean, build, bundle, package-solution, serve, trust-dev-cert, untrust-dev-cert, and test. For production-like bundles, always use --ship; only then do you get minification, CDN manifests, and release-ready packages.
Generator-Optionen Generator options
| Option Option | Bedeutung Meaning | Praxis Practical note |
|---|---|---|
| Solution Name Solution name | Steuert Paketidentität und Solution-Metadaten. Controls package identity and solution metadata. | Später nicht leichtfertig ändern, da CI/CD und Dokumentation daran hängen. Do not change lightly later because CI/CD and documentation depend on it. |
| Component Type Component type | Web Part, Extension oder ACE. Web part, extension, or ACE. | Bestimmt Hostkontext und verfügbare APIs. Determines host context and available APIs. |
| Framework Framework | None, React oder andere unterstützte Optionen je Generatorversion. None, React, or other supported options depending on generator version. | React ist in vielen Tenants der De-facto-Standard. React is the de facto standard in many tenants. |
| Tenant deployment Tenant deployment | Skip feature deployment für tenantweite Verfügbarkeit. Skip feature deployment for tenant-wide availability. | Nur für sichere, breit getestete Lösungen aktivieren. Enable only for safe, broadly tested solutions. |
Gulp-Kommandoreferenz Gulp command reference
| Befehl Command | Zweck Purpose | Notiz Note |
|---|---|---|
| gulp clean gulp clean | Löscht dist/temp-Artefakte. Deletes dist/temp artifacts. | Vor reproduzierbaren Builds sinnvoll. Useful before reproducible builds. |
| gulp build gulp build | Kompiliert TypeScript und Assets. Compiles TypeScript and assets. | Schneller Syntax- und Typcheck im Alltag. Fast syntax and type check in daily work. |
| gulp serve gulp serve | Startet lokalen Workbench-Workflow. Starts the local workbench workflow. | Für schnelle UI-Iteration; nicht repräsentativ für alle Tenant-Integrationen. For fast UI iteration; not representative for all tenant integrations. |
| gulp bundle --ship gulp bundle --ship | Erstellt produktionsnahe Bundles. Creates production-like bundles. | Für Releases immer mit --ship ausführen. Always run with --ship for releases. |
| gulp package-solution --ship gulp package-solution --ship | Erzeugt das .sppkg-Paket. Generates the .sppkg package. | Resultat liegt unter sharepoint/solution. Output is under sharepoint/solution. |
| gulp trust-dev-cert / untrust-dev-cert gulp trust-dev-cert / untrust-dev-cert | Verwaltet lokale Entwicklungszertifikate. Manages local development certificates. | Besonders für https-Lokaltests relevant. Especially relevant for local https testing. |
| gulp test gulp test | Führt vorhandene Tests aus. Runs existing tests. | Test-Framework hängt von Projektvorlage ab. The test framework depends on the project template. |
Implementierung Implementation
- Bestandsaufnahme, Rollen und Abhängigkeiten für Yeoman Generator, Projektstruktur und alle Gulp-Kommandos dokumentieren. Document the current state, roles, and dependencies for Yeoman generator, project structure, and all gulp commands.
- Pilotobjekte mit realistischen Daten und Berechtigungen auswählen. Select pilot objects with realistic data and permissions.
- Portaländerungen immer mit PowerShell oder API-Abfragen gegenprüfen. Always validate portal changes with PowerShell or API queries.
- Monitoring, Support-Runbook und Rückfalloptionen vor der Produktion festhalten. Capture monitoring, support runbooks, and rollback options before production rollout.
Betrieb & Hinweise Operations & Notes
- Tenant-Limits, Lizenzzustand und Rollenzuweisungen beeinflussen Yeoman Generator, Projektstruktur und alle Gulp-Kommandos direkt. Tenant limits, license state, and role assignments directly affect Yeoman generator, project structure, and all gulp commands.
- Automatisierung sollte Idempotenz, Logging und Fehlerklassifizierung enthalten. Automation should include idempotency, logging, and error classification.
- Änderungen sollten in Pilotwellen getestet und mit Nutzerkommunikation begleitet werden. Changes should be tested in pilot waves and accompanied by user communication.
- Für Audits lohnt sich eine dokumentierte Soll-Konfiguration mit regelmäßigem Drift-Abgleich. For audits, keep a documented target state and compare for drift regularly.
PowerShell: Generator und Build PowerShell: generator and build
npm install -g yo @microsoft/generator-sharepoint
yo @microsoft/sharepoint
gulp clean
gulp build
gulp bundle --ship
gulp package-solution --ship
API-Berechtigungen, App Catalogs, CDN und Deployment API permissions, app catalogs, CDN, and deployment
SPFx-Lösungen deklarieren API-Berechtigungen in package-solution.json und beantragen diese im Tenant. Nach dem Upload in den App Catalog muss ein Administrator ausstehende API Requests genehmigen, bevor AadHttpClient oder MSGraphClient produktiv funktionieren. SPFx solutions declare API permissions in package-solution.json and request them in the tenant. After upload to the app catalog, an administrator must approve pending API requests before AadHttpClient or MSGraphClient works in production.
Für produktive Bundles brauchen Sie außerdem ein Asset-Hosting-Modell. Das kann das SharePoint App Catalog CDN, Microsoft 365 Public/Private CDN oder ein externes Storage-Konto sein. Tenant-wide deployment spart Site-Installationen, erhöht aber den Governance-Anspruch an Versionierung und Rückfallstrategie. Production bundles also need an asset-hosting model. That can be the SharePoint app catalog CDN, Microsoft 365 public or private CDN, or an external storage account. Tenant-wide deployment reduces site installs but raises the governance bar for versioning and rollback.
Deployment-Bausteine Deployment building blocks
| Bereich Area | Werkzeug Tooling | Wichtige Punkte Key points |
|---|---|---|
| API Requests API requests | package-solution.json, Admin Center, Graph permissions page package-solution.json, admin center, Graph permissions page | Scopes minimieren und dokumentieren. Minimize and document scopes. |
| App Catalog App catalog | Tenant App Catalog oder Site Collection App Catalog Tenant app catalog or site collection app catalog | Tenant Catalog für zentrale Governance, Site Catalog für lokale Lösungen. Use tenant catalog for central governance and site catalog for local solutions. |
| CDN CDN | Microsoft 365 CDN, App Catalog assets, Azure Storage Microsoft 365 CDN, app catalog assets, Azure Storage | Cache-Invaliderung und Asset-URL-Strategie festlegen. Define cache invalidation and asset URL strategy. |
| Tenant-wide deployment Tenant-wide deployment | skipFeatureDeployment / Enable in catalog skipFeatureDeployment / enable in catalog | Nur für etablierte Komponenten mit klarer Supportkette. Use only for mature components with a clear support chain. |
Implementierung Implementation
- Bestandsaufnahme, Rollen und Abhängigkeiten für API-Berechtigungen, App Catalogs, CDN und Deployment dokumentieren. Document the current state, roles, and dependencies for API permissions, app catalogs, CDN, and deployment.
- Pilotobjekte mit realistischen Daten und Berechtigungen auswählen. Select pilot objects with realistic data and permissions.
- Portaländerungen immer mit PowerShell oder API-Abfragen gegenprüfen. Always validate portal changes with PowerShell or API queries.
- Monitoring, Support-Runbook und Rückfalloptionen vor der Produktion festhalten. Capture monitoring, support runbooks, and rollback options before production rollout.
Betrieb & Hinweise Operations & Notes
- Tenant-Limits, Lizenzzustand und Rollenzuweisungen beeinflussen API-Berechtigungen, App Catalogs, CDN und Deployment direkt. Tenant limits, license state, and role assignments directly affect API permissions, app catalogs, CDN, and deployment.
- Automatisierung sollte Idempotenz, Logging und Fehlerklassifizierung enthalten. Automation should include idempotency, logging, and error classification.
- Änderungen sollten in Pilotwellen getestet und mit Nutzerkommunikation begleitet werden. Changes should be tested in pilot waves and accompanied by user communication.
- Für Audits lohnt sich eine dokumentierte Soll-Konfiguration mit regelmäßigem Drift-Abgleich. For audits, keep a documented target state and compare for drift regularly.
JSON: API-Berechtigungen JSON: API permissions
{
"solution": {
"name": "contoso-news-client-side-solution",
"id": "11111111-2222-3333-4444-555555555555",
"version": "1.0.0.0",
"includeClientSideAssets": true,
"skipFeatureDeployment": true,
"webApiPermissionRequests": [
{
"resource": "Microsoft Graph",
"scope": "Sites.Read.All"
}
]
}
}
PowerShell: PnP Deployment PowerShell: PnP deployment
Connect-PnPOnline -Url https://contoso-admin.sharepoint.com -Interactive
Add-PnPApp -Path .\sharepoint\solution\contoso.sppkg -Publish -Overwrite
Install-PnPApp -Identity contoso.sppkg -Scope Tenant
Get-PnPApp | Format-Table Title,Deployed,AppCatalogVersion
Web Parts, Extensions, ACE und Teams-Integration Web parts, extensions, ACE, and Teams integration
Web Parts sind der Standard für Seiteninhalte; Extensions verändern bestehende Oberflächen. Adaptive Card Extensions adressieren Viva Connections Dashboards. Für Teams-Integration kann eine SPFx-Web-Part-Lösung als persönliche App, Tab oder Meeting-Oberfläche eingebunden werden, wenn Manifest und Hostkontext zusammenpassen. Web parts are the standard for page content; extensions change existing surfaces. Adaptive card extensions target Viva Connections dashboards. For Teams integration, an SPFx web-part solution can be embedded as a personal app, tab, or meeting surface when the manifest and host context align.
Wichtig ist die klare Trennung zwischen SharePoint-Lösung und Teams-App-Paket. Das SPFx-Paket liefert die Webkomponente, während das Teams-Manifest Hosteinbindung, App-Name, Icons und Kontextdefinitionen beschreibt. It is important to separate the SharePoint solution from the Teams app package. The SPFx package delivers the web component, while the Teams manifest describes host integration, app name, icons, and context definitions.
Integrationsmuster Integration patterns
| Muster Pattern | Vorteil Benefit | Achten auf Watch out for |
|---|---|---|
| SharePoint Web Part SharePoint web part | Nahtlose Nutzung auf modernen Seiten. Seamless use on modern pages. | Page-Performance und Eigenschaftspflege. Page performance and property maintenance. |
| Teams personal app / tab Teams personal app / tab | Gleiche Business-Logik in Teams verfügbar. Same business logic available in Teams. | Responsives Design und Host-Theming. Responsive design and host theming. |
| Viva Connections ACE Viva Connections ACE | Schneller Zugriff über Dashboard-Karten. Fast access through dashboard cards. | Kurze Interaktionen, keine komplexen Langformulare. Keep interactions brief; avoid long forms. |
| Application Customizer Application customizer | Globale Navigation, Announcements oder Telemetriehaken. Global navigation, announcements, or telemetry hooks. | Tenantweite Reichweite verlangt strenge Qualitätskontrolle. Tenant-wide scope requires strict quality control. |
Implementierung Implementation
- Bestandsaufnahme, Rollen und Abhängigkeiten für Web Parts, Extensions, ACE und Teams-Integration dokumentieren. Document the current state, roles, and dependencies for Web parts, extensions, ACE, and Teams integration.
- Pilotobjekte mit realistischen Daten und Berechtigungen auswählen. Select pilot objects with realistic data and permissions.
- Portaländerungen immer mit PowerShell oder API-Abfragen gegenprüfen. Always validate portal changes with PowerShell or API queries.
- Monitoring, Support-Runbook und Rückfalloptionen vor der Produktion festhalten. Capture monitoring, support runbooks, and rollback options before production rollout.
Betrieb & Hinweise Operations & Notes
- Tenant-Limits, Lizenzzustand und Rollenzuweisungen beeinflussen Web Parts, Extensions, ACE und Teams-Integration direkt. Tenant limits, license state, and role assignments directly affect Web parts, extensions, ACE, and Teams integration.
- Automatisierung sollte Idempotenz, Logging und Fehlerklassifizierung enthalten. Automation should include idempotency, logging, and error classification.
- Änderungen sollten in Pilotwellen getestet und mit Nutzerkommunikation begleitet werden. Changes should be tested in pilot waves and accompanied by user communication.
- Für Audits lohnt sich eine dokumentierte Soll-Konfiguration mit regelmäßigem Drift-Abgleich. For audits, keep a documented target state and compare for drift regularly.
JSON: Teams-Manifest-Ausschnitt JSON: Teams manifest snippet
{
"manifestVersion": "1.17",
"version": "1.0.0",
"id": "11111111-2222-3333-4444-555555555555",
"name": { "short": "Contoso Portal" },
"staticTabs": [
{
"entityId": "home",
"name": "Contoso Portal",
"contentUrl": "https://contoso.sharepoint.com/sites/app/SitePages/home.aspx",
"scopes": ["personal"]
}
]
}
Versionierung, PnP Controls, Debugging und Performance Versioning, PnP controls, debugging, and performance
Versionsfelder existieren an mehreren Stellen: package.json, package-solution.json, Teams-Manifest und gegebenenfalls Deployment-Pipeline. Diese Versionen sollten bewusst synchronisiert werden, damit Support, Rollback und App-Updates nachvollziehbar bleiben. Version fields exist in several places: package.json, package-solution.json, the Teams manifest, and possibly the deployment pipeline. These versions should be synchronized intentionally so support, rollback, and app updates remain traceable.
Für Performance zählen Bundle-Größe, Lazy Loading, API-Call-Strategie, Caching und die Zahl der DOM-Operationen. PnP Controls und PnPjs beschleunigen die Entwicklung, sollten aber bewusst tree-shaken und nur dort eingesetzt werden, wo der Mehrwert den Bundle-Impact rechtfertigt. Performance depends on bundle size, lazy loading, API-call strategy, caching, and the number of DOM operations. PnP Controls and PnPjs speed up development, but they should be tree-shaken deliberately and used only where the value outweighs the bundle impact.
Best Practices für Produktivbetrieb Best practices for production
| Thema Topic | Empfehlung Recommendation | Nutzen Benefit |
|---|---|---|
| SemVer SemVer | Major/Minor/Patch strikt an Breaking Changes koppeln. Tie major, minor, and patch versions strictly to breaking changes. | Erleichtert Rollback und Kompatibilitätsprüfung. Simplifies rollback and compatibility checks. |
| PnP Controls PnP Controls | Nur benötigte Controls importieren und Side-Effects prüfen. Import only required controls and review side effects. | Reduziert Bundle-Größe und unnötige Abhängigkeiten. Reduces bundle size and unnecessary dependencies. |
| Debugging Debugging | Workbench, query-string debugManifestsFile, Browser DevTools und Telemetrie kombinieren. Combine workbench, query-string debugManifestsFile, browser DevTools, and telemetry. | Fehler schneller bis in den Hostkontext nachverfolgen. Trace failures faster into the host context. |
| Caching Caching | API-Responses und Konfigurationsdaten gezielt cachen. Cache API responses and configuration data deliberately. | Verbessert Benutzererlebnis und reduziert API-Drosselung. Improves UX and reduces API throttling. |
Implementierung Implementation
- Bestandsaufnahme, Rollen und Abhängigkeiten für Versionierung, PnP Controls, Debugging und Performance dokumentieren. Document the current state, roles, and dependencies for Versioning, PnP controls, debugging, and performance.
- Pilotobjekte mit realistischen Daten und Berechtigungen auswählen. Select pilot objects with realistic data and permissions.
- Portaländerungen immer mit PowerShell oder API-Abfragen gegenprüfen. Always validate portal changes with PowerShell or API queries.
- Monitoring, Support-Runbook und Rückfalloptionen vor der Produktion festhalten. Capture monitoring, support runbooks, and rollback options before production rollout.
Betrieb & Hinweise Operations & Notes
- Tenant-Limits, Lizenzzustand und Rollenzuweisungen beeinflussen Versionierung, PnP Controls, Debugging und Performance direkt. Tenant limits, license state, and role assignments directly affect Versioning, PnP controls, debugging, and performance.
- Automatisierung sollte Idempotenz, Logging und Fehlerklassifizierung enthalten. Automation should include idempotency, logging, and error classification.
- Änderungen sollten in Pilotwellen getestet und mit Nutzerkommunikation begleitet werden. Changes should be tested in pilot waves and accompanied by user communication.
- Für Audits lohnt sich eine dokumentierte Soll-Konfiguration mit regelmäßigem Drift-Abgleich. For audits, keep a documented target state and compare for drift regularly.
PowerShell: Release-Runbook PowerShell: release runbook
npm ci
gulp clean
gulp bundle --ship
gulp package-solution --ship
Connect-PnPOnline -Url https://contoso-admin.sharepoint.com -Interactive
Add-PnPApp -Path .\sharepoint\solution\contoso.sppkg -Publish -Overwrite
PnP PowerShell Deployment und Best Practices PnP PowerShell deployment and best practices
PnP PowerShell deckt Upload, Publish, Install und Inventarisierung von SPFx-Paketen ab. In Kombination mit CI/CD kann dieselbe Skriptstrecke App Catalog, Site Collection App Catalog, Site Contents und Folgekonfiguration wie Property Bags oder Seiteninstallation steuern. PnP PowerShell covers upload, publish, install, and inventory of SPFx packages. Combined with CI/CD, the same script path can control the app catalog, site collection app catalog, site contents, and follow-up configuration such as property bags or page installation.
Bewährte Praxis sind getrennte Pipelines für Build und Release, ein Versionsgate gegen den App Catalog sowie ein dokumentierter Fallback auf die letzte bekannte stabile .sppkg-Version. Tenant-wide deployment sollte nur nach Pilotierung in repräsentativen Site- und Teams-Kontexten erfolgen. Best practice is to separate build and release pipelines, gate against the app catalog version, and maintain a documented fallback to the last known stable .sppkg version. Tenant-wide deployment should happen only after pilot validation across representative site and Teams contexts.
Wichtige PnP-Cmdlets Important PnP cmdlets
| Cmdlet Cmdlet | Nutzen Use | Kommentar Comment |
|---|---|---|
| Get-PnPTenantAppCatalogUrl Get-PnPTenantAppCatalogUrl | Liest die Tenant-App-Catalog-URL. Reads the tenant app catalog URL. | Guter Preflight-Check für Deployments. Good preflight check for deployments. |
| Add-PnPApp Add-PnPApp | Lädt ein .sppkg hoch und kann es direkt veröffentlichen. Uploads a .sppkg and can publish it immediately. | Mit -Overwrite für Upgrades geeignet. Use -Overwrite for upgrades. |
| Publish-PnPApp Publish-PnPApp | Veröffentlicht eine bereits hochgeladene App. Publishes an already uploaded app. | Nützlich, wenn Upload und Publish getrennt werden. Useful when upload and publish are separated. |
| Install-PnPApp Install-PnPApp | Installiert App auf Site oder Tenant-Scope. Installs app on site or tenant scope. | Scope bewusst wählen, um Wildwuchs zu vermeiden. Choose scope deliberately to avoid sprawl. |
| Get-PnPApp Get-PnPApp | Inventarisiert Version und Deploymentstatus. Inventories version and deployment status. | Für Release-Gates sehr hilfreich. Very useful for release gates. |
Implementierung Implementation
- Bestandsaufnahme, Rollen und Abhängigkeiten für PnP PowerShell Deployment und Best Practices dokumentieren. Document the current state, roles, and dependencies for PnP PowerShell deployment and best practices.
- Pilotobjekte mit realistischen Daten und Berechtigungen auswählen. Select pilot objects with realistic data and permissions.
- Portaländerungen immer mit PowerShell oder API-Abfragen gegenprüfen. Always validate portal changes with PowerShell or API queries.
- Monitoring, Support-Runbook und Rückfalloptionen vor der Produktion festhalten. Capture monitoring, support runbooks, and rollback options before production rollout.
Betrieb & Hinweise Operations & Notes
- Tenant-Limits, Lizenzzustand und Rollenzuweisungen beeinflussen PnP PowerShell Deployment und Best Practices direkt. Tenant limits, license state, and role assignments directly affect PnP PowerShell deployment and best practices.
- Automatisierung sollte Idempotenz, Logging und Fehlerklassifizierung enthalten. Automation should include idempotency, logging, and error classification.
- Änderungen sollten in Pilotwellen getestet und mit Nutzerkommunikation begleitet werden. Changes should be tested in pilot waves and accompanied by user communication.
- Für Audits lohnt sich eine dokumentierte Soll-Konfiguration mit regelmäßigem Drift-Abgleich. For audits, keep a documented target state and compare for drift regularly.
PowerShell: Vollständiger Deployment-Flow PowerShell: full deployment flow
Connect-PnPOnline -Url https://contoso-admin.sharepoint.com -Interactive
$app = Add-PnPApp -Path .\sharepoint\solution\contoso.sppkg -Overwrite
Publish-PnPApp -Identity $app.Id
Install-PnPApp -Identity $app.Id -Scope Tenant
Get-PnPApp -Identity $app.Id | Format-List Title,InstalledVersion,AppCatalogVersion,Deployed
Diese Seite ergänzt die Search-, Informationsarchitektur- und Teams-App-Dokumentation für End-to-End-Lösungen auf Microsoft 365. This page complements the search, information architecture, and Teams app documentation for end-to-end Microsoft 365 solutions.
Search Schema und Result Pages für SPFx-Lösungen. Search schema and result pages for SPFx solutions.
Content Types, Taxonomie und Site Templates als Lösungsbasis. Content types, taxonomy, and site templates as a solution foundation.
Teams-Hosting, Manifest und Governance für App-Lösungen. Teams hosting, manifests, and governance for app solutions.