# Migrate from SharePoint or Power Pages to Agility

> Source: https://agilitycms.com/docs/developers/migrate-from-sharepoint-and-power-pages

> [!NOTE]
> We last checked this guide on November 2, 2026, against Microsoft's documentation for Microsoft Graph and the Power Platform CLI. Microsoft's tools change often, so if something here doesn't match what you see in your tenant, Microsoft's documentation has the latest.

Moving off SharePoint or Power Pages is less about copying pages and more about deciding what *not* to move. News and pages come to Agility, where editors get workflow, scheduling and in-context editing. Controlled documents usually stay in SharePoint, where their permissions already work. Forms and application data stay where they are.

## At a glance

1. **Decide** what moves, what gets linked and what stays ([step 1](#1-decide-what-moves)).
2. **Export** SharePoint pages, news and lists with Microsoft Graph ([step 2](#2-export-from-sharepoint)), or a Power Pages site with `pac pages download` ([step 3](#3-export-from-power-pages)).
3. **Map** pages, web parts, lists and snippets to Agility models ([step 4](#4-map-to-agility)).
4. **Clean up** the HTML: links, images and layout markup ([step 5](#5-clean-up-the-html)).
5. **Import** in dependency order with the Management SDK or an AI agent ([step 6](#6-import-into-agility)).
6. **Switch over**: map old URLs and retire the old site ([step 7](#7-urls-and-cutover)).

This guide applies the phases in [Migrating to Agility](/docs/developers/migrating-to-agility) to an intranet or portal built on SharePoint Online or Microsoft Power Pages.

## 1. Decide what moves

This is the most important step. A clear decision for each kind of content saves weeks later.

| Content | Usual decision | Why |
| --- | --- | --- |
| News posts and announcements | Move to an Agility list | Editors want workflow, scheduling and in-context editing |
| Landing and information pages | Move to Agility pages and components | |
| Quick links, contacts, locations | Move to shared lists | Reused in many places |
| Controlled documents (policies, handbooks, forms) | **Stay in SharePoint**, linked from Agility | SharePoint keeps versions and per-user permissions. Agility media is served from a public CDN URL |
| Images used on pages | Move to the Agility media library | |
| SharePoint lists used as data (requests, registers) | Usually stay, or move to Dataverse or another system of record | They are application data, not content |
| Power Pages forms, lists and Dataverse records | Stay in Power Pages and Dataverse | Agility doesn't replace forms or Dataverse data |

## 2. Export from SharePoint

Microsoft Graph gives you every modern page, news post and list as JSON. Use an app registration that has `Sites.Read.All` (or a delegated token for a signed-in user with read access).

| Request | Returns |
| --- | --- |
| `GET /sites/{hostname}:/sites/{site-path}` | The site and its `id` |
| `GET /sites/{site-id}/pages/microsoft.graph.sitePage` | The site's modern pages, including news posts |
| `GET /sites/{site-id}/pages/{page-id}/microsoft.graph.sitePage?$expand=canvasLayout` | One page with its sections, columns and web parts |
| `GET /sites/{site-id}/lists` | The site's lists and libraries |
| `GET /sites/{site-id}/lists/{list-id}/items?$expand=fields` | List items with their column values |
| `GET /sites/{site-id}/drive/root/children` | Files and folders in the default document library |

What to keep from each page:

- **Title, description, `webUrl`, created and modified dates and authors.** Store the page `id` in a `SourceID` Text field.
- **`promotionKind`.** `newsPost` marks a news post; `page` is an ordinary page. News usually becomes items in an Announcements or News list.
- **The canvas layout.** Horizontal sections hold columns, and columns hold web parts. A `textWebPart` has its HTML in `innerHtml`. A `standardWebPart` has a `webPartType` and its settings in `data`, such as an image or a quick links web part.

Follow `@odata.nextLink` until there are no more pages of results.

### Classic SharePoint pages

Graph's `sitePage` API covers modern pages. Classic wiki and publishing pages aren't returned by it. Inventory them from the site's Site Pages or Pages library and read their HTML, or modernize them first with Microsoft's page transformation tools, then export.

## 3. Export from Power Pages

One command downloads the whole site's configuration with the Power Platform CLI:

```bash
pac pages download --path ./site-export --webSiteId <website record id> --modelVersion 2
```

Use `--modelVersion 2` for sites on the enhanced data model. The download is a folder of YAML and HTML files:

| Folder | Holds | In Agility |
| --- | --- | --- |
| `web-pages` | Each page's settings and its copy (HTML) | Pages, with the copy split into components |
| `content-snippets` | Reusable text and HTML (headers, footers, notices) | A single-item content model, or a shared list |
| `web-templates` | Liquid templates | Front-end code, not content. Rebuild them in your front end |
| `web-files` | Images, CSS, JavaScript | Images go to the media library; CSS and JavaScript to the front end |
| `weblink-sets` | Navigation links | The sitemap, or a Links list for menus |

Records in other Dataverse tables (the data behind lists, forms and Liquid `fetchxml` queries) are application data. Leave them in Dataverse unless they are really editorial content. If you keep Power Pages as the front end, the site can read the new content from Agility; see [Microsoft Power Pages](/docs/developers/microsoft-power-pages).

## 4. Map to Agility

Most of the mapping is straightforward. The judgment calls are layouts and web parts: aim for a small set of components editors can understand, not a copy of every SharePoint layout.

| SharePoint or Power Pages | Agility | Notes |
| --- | --- | --- |
| News post | Item in a News or Announcements list | Keep the publish date, author and thumbnail |
| Modern page | A page in the sitemap | The site structure and page library folders become the sitemap tree |
| Page section and column layout | A [page model](/docs/developers/page-models) with zones | Keep layouts few; editors pick components, not columns |
| Text web part | A Rich Text component, or HTML fields on a structured component | Prefer structured fields where the text has a pattern |
| Image, hero, quick links web parts | Component models | Quick links that repeat across pages fit a shared list |
| SharePoint list with editorial content | A content list | Columns become fields; choice columns become Drop-down Lists |
| Site columns and managed metadata | Drop-down Lists or a taxonomy list | See [Designing a Taxonomy That Scales](/docs/developers/designing-a-taxonomy) |
| Document library file | A URL field linking to SharePoint, or the media library | See [step 1](#1-decide-what-moves) |
| Power Pages web page copy | Components on the page | Split long copy into structured components |
| Content snippet | Single-item content or a shared list | |
| Web link set | The sitemap, or a Links list | |
| Page permissions, web roles, audience targeting | Your front end's sign-in and filtering | Agility doesn't enforce reader permissions. See [Reference Architecture: Member Portal and Intranet](/docs/developers/reference-architecture-member-portal) |

### Field types

| SharePoint column type | Agility field type |
| --- | --- |
| Single line of text | Text |
| Multiple lines of text (plain) | Multi-Line Text |
| Multiple lines of text (rich) | HTML |
| Choice | Drop-down List |
| Number | Number or Decimal |
| Date and Time | Date/Time |
| Yes/No | True/False |
| Hyperlink | URL |
| Image | Image |
| Lookup | Linked Content |
| Person or Group | Text (name), or Linked Content to a People list |

## 5. Clean up the HTML

SharePoint and Power Pages HTML carries markup that won't make sense on the new site:

- **Rewrite links.** Links to `/sites/{site}/SitePages/...aspx` must point at the new page paths. Links to documents that stay in SharePoint stay as they are.
- **Move images.** Upload images referenced from page HTML to the Agility media library and replace their URLs.
- **Strip layout markup.** Remove SharePoint's wrapper `div`s, inline styles and empty paragraphs. Keep headings, lists, links and tables.

[Legacy Content Migration](/docs/developers/legacy-content-migration) covers parsing HTML into structured fields.

## 6. Import into Agility

Import in dependency order, keeping a map from the source ID to the Agility content ID, page ID or asset URL:

1. Images, uploaded to the media library.
2. Shared lists: categories, departments, quick links, contacts.
3. News and other list items.
4. Pages, then the components on each page.

Use the Management SDK, saving in sequential batches and checking every result, as shown in [Migrating Content into Agility with an AI Agent](/docs/developers/migrating-content-with-an-ai-agent#step-5-scale-up-with-a-management-sdk-script). An AI agent with the Agility MCP Server is a fast way to inventory a SharePoint export, propose models and import a reviewable sample.

## 7. URLs and cutover

An intranet's search ranking rarely matters, but its links do: they live in Teams posts, emails, bookmarks and other SharePoint sites.

- **List every page URL** from the export and from your analytics, and map each one to its new URL.
- **Load redirects** in Agility's [URL Redirections](/docs/editors/url-redirections) for your new front end to apply.
- **Plan for the old site.** SharePoint Online doesn't give you server-side 301 redirects for site pages. Update navigation, Teams tabs and pinned links, and leave a short page on the old site that points to the new one before you retire it.
- **Freeze, sync and switch** using the [Migration Cutover Runbook](/docs/developers/migration-cutover-runbook).

For a public site, also follow [Keep Your Search Rankings Through a Migration](/docs/developers/keep-search-rankings-through-a-migration).

## Checklist

- [ ] Every content type has a decision: move, link or leave.
- [ ] Controlled documents stay in SharePoint and are linked, not copied to public media.
- [ ] News posts are separated from ordinary pages using `promotionKind`.
- [ ] Web parts and Power Pages copy map to a small set of components.
- [ ] Links inside HTML point at new pages, and images at the Agility media library.
- [ ] Reader permissions are handled by the new front end.
- [ ] Every old URL has a new home, and the old site points to it.

## Related

- [Migrating to Agility](/docs/developers/migrating-to-agility)
- [SharePoint](/docs/developers/sharepoint)
- [Microsoft Power Pages](/docs/developers/microsoft-power-pages)
- [Legacy Content Migration](/docs/developers/legacy-content-migration)
- [Migration Cutover Runbook](/docs/developers/migration-cutover-runbook)
- Microsoft: [sitePage resource](https://learn.microsoft.com/graph/api/resources/sitepage), [pac pages](https://learn.microsoft.com/power-platform/developer/cli/reference/pages)

---

## Related pages

- [Migrating to Agility](https://agilitycms.com/docs/developers/migrating-to-agility.md)
- [Migrate from WordPress to Agility](https://agilitycms.com/docs/developers/migrate-from-wordpress.md)
- [Migrate from Contentful to Agility](https://agilitycms.com/docs/developers/migrate-from-contentful.md)
- [Migrate from Sitecore to Agility](https://agilitycms.com/docs/developers/migrate-from-sitecore.md)
- [Migration Cutover Runbook](https://agilitycms.com/docs/developers/migration-cutover-runbook.md)
- [Keep Your Search Rankings Through a Migration](https://agilitycms.com/docs/developers/keep-search-rankings-through-a-migration.md)

Index of every docs page: https://agilitycms.com/docs/llms.txt
