Merge pull request #34053 from sriharsha9618/msgraph-incremental

feat(catalog): add plugin-catalog-backend-module-msgraph-incremental
This commit is contained in:
Fredrik Adelöw
2026-05-05 16:21:37 +03:00
committed by GitHub
19 changed files with 2769 additions and 2 deletions
+31
View File
@@ -50,6 +50,37 @@ backend.add(import('@backstage/plugin-catalog-backend-module-msgraph'));
/* highlight-add-end */
```
## Incremental Ingestion for Large Tenants
For very large Azure AD tenants where loading the full dataset into memory at once is not feasible, the `@backstage/plugin-catalog-backend-module-msgraph-incremental` package provides a memory-efficient alternative. It processes users and groups one page at a time and persists the `@odata.nextLink` cursor so ingestion resumes from the last completed page after a pod restart.
```bash title="From your Backstage root directory"
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-incremental-ingestion
yarn --cwd packages/backend add @backstage/plugin-catalog-backend-module-msgraph-incremental
```
```ts title="packages/backend/src/index.ts"
backend.add(import('@backstage/plugin-catalog-backend'));
/* highlight-add-start */
backend.add(
import('@backstage/plugin-catalog-backend-module-incremental-ingestion'),
);
backend.add(
import('@backstage/plugin-catalog-backend-module-msgraph-incremental'),
);
/* highlight-add-end */
```
It uses the same `catalog.providers.microsoftGraphOrg` configuration as the standard module. The following options are **not** supported by the incremental provider: `userGroupMember*` and `groupIncludeSubGroups`. Use `MicrosoftGraphOrgEntityProvider` if you require those.
| | `MicrosoftGraphOrgEntityProvider` | Incremental provider |
| -------------------------- | --------------------------------- | -------------------- |
| Memory usage | Full dataset in RAM | One page at a time |
| Resume on restart | Starts from scratch | Resumes from cursor |
| `userGroupMember*` options | Supported | Not supported |
| `groupIncludeSubGroups` | Supported | Not supported |
| Suitable for large tenants | No | Yes |
## Authenticating with Microsoft Graph
### Local Development