Get-MgAllSite and Skip Tokens
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 40/100
Línea de trabajo
Comience con el cmdlet Get-MgAllSite y su gestión de skiptoken, utilizando la respuesta informada de Invoke-MgGraphRequest como referencia para nextLink. Determine cómo debería exponer o seguir la paginación el cmdlet y, a continuación, verifique que las solicitudes puedan recuperar más de 600 sitios y que el token de next-link esté disponible como se espera.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
The Get-MgAllSite cmdlet returns a maximum of 600 sites. The cmdlet supports a skiptoken parameter to take a nextlink and return the next page of data, but there's no obvious way of finding the token (which is returned by the underlying Graph API - see debug output below).
In other words, this works:
[array]$GraphSites = Invoke-MgGraphRequest -Uri $Uri -Method Get
$Graphsites
Name Value
value {Project Zaja, Office 365 for IT Pros (2026 Edition), Critical Project Planning - HR Advice, Critical Project Planning - Legal advice…}
@odata.nextLink https://graph.microsoft.com/v1.0/sites/getAllSites?$skiptoken=UGFnZWQ9VFJVRSZwX1RpbWVEZWxldGVkPSZwX0lEPTUyMw
@odata.context https://graph.microsoft.com/v1.0/$metadata#sites
This doesn't:
[array]$Sites = Get-MgAllSite
$Sites | Select-Object -First 5
DisplayName Id Name
Project Zaja redmondassociates.sharepoint.com,9ba323bf-cf4d-4d8b-a9dc-880cc2341977,971e2d7f-def2-4f61-ba98-50cd95795b13 Project Zaja
Office 365 for IT Pros (2026 Edition) redmondassociates.sharepoint.com,113046d4-4c00-4a8f-a0b0-9ce5a363cf9a,70e4385d-48f9-4d5e-95a0-f5e890978ac5 Office 365 for IT Pros (2026…
Critical Project Planning - HR Advice redmondassociates.sharepoint.com,8094d05f-eece-477a-a700-34a5d210b307,a9415985-41f2-4af4-a403-57fca1597f63 Critical Project Planning - …
Critical Project Planning - Legal advice redmondassociates.sharepoint.com,2d67176d-eb90-4d87-b51e-56b0b389e6e9,a9415985-41f2-4af4-a403-57fca1597f63 Critical Project Planning - …
MDO License Assignments redmondassociates.sharepoint.com,da416236-22fe-48af-960d-252b30e0d9d7,c2730fcf-4fbd-48b4-a127-b6c664222c21 MDO License Assignments
The cmdlet should support an All parameter to allow all sites to be retrieved.
Expected behavior
I expect a nextlink token to be available if Get-MgAllSites finds more than 600 sites.
How to reproduce
See above.
SDK Version
V2.30
Latest version known to work for scenario above?
No response
Known Workarounds
Use the Graph API
Debug output
Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : b017fe39-b336-45f2-8833-1638c8661947
client-request-id : 25dfb918-0a3a-44f1-bbc5-b23aff14bbba
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"008","RoleInstance":"DU2PEPF00045843"}}
splogid : da81c8a1-409e-a000-0bf7-a1ac56684946
odata-version : 4.0
Date : Tue, 23 Sep 2025 09:39:00 GMT
Body:
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/sites/microsoft.graph.getAllSites()?$skiptoken=UGFnZWQ9VFJVRSZwX1RpbWVEZWxldGVkPSZwX0lEPTUyMw",
"value": [
{
"createdDateTime": "2025-09-23T09:24:29Z",
"id": "redmondassociates.sharepoint.com,9ba323bf-cf4d-4d8b-a9dc-880cc2341977,971e2d7f-def2-4f61-ba98-50cd95795b13",
"name": "Project Zaja",
"webUrl": "https://redmondassociates.sharepoint.com/sites/ProjectZaja",
"displayName": "Project Zaja",
"isPersonalSite": false,
"siteCollection": {
"hostname": "redmondassociates.sharepoint.com"
},
"root": {}
Click to expand log
<Log output here>
Configuration
$psversiontable
Name Value
PSVersion 7.5.3
PSEdition Core
GitCommitId 7.5.3
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Other information
No response
- Lenguaje dominante
- C#
- Estrellas
- 902
- Forks
- 233
- Merge medio
- 1 d 3 h
- PR fusionados (30 d)
- 24
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoftgraph/msgraph-sdk-powershell
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
Los mantenedores suelen responder en 1 día
-
New-MgGroupMember Missing from DocsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertostatus:waiting-for-triage type:bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
microsoftgraph/msgraph-sdk-powershell#3751 ·
Los mantenedores suelen responder en 1 día
-
Graph PowerShell 2.41.0: Connect-MgGraph fails loading System.Text.Json 10; downgrading to 2.40.0 resolvesPosiblemente ocupada @svrooij la tomó hace 1 día. AbiertoNeeds: Attention :wave: status:waiting-for-triage type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
microsoftgraph/msgraph-sdk-powershell#3810 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Supported way to get the tokenAbiertostatus:waiting-for-triage type:feature
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Microsoft.Graph.Authentication fails after removal and re-import in the same PowerShell sessionAbiertostatus:waiting-for-triage type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
microsoftgraph/msgraph-sdk-powershell#3805 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de microsoftgraph/msgraph-sdk-powershell
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Los mantenedores suelen responder en 1 día
-
:watch: Not Triaged aspnet-core/svc fundamentals/subsvc Source - Docs.ms
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
dotnet/AspNetCore.Docs#37785 ·
Los mantenedores suelen responder en 1 día
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Azure/azure-sdk-tools#17204 ·
Los mantenedores suelen responder en 1 día
-
Проблема с Dotnet RUAbiertoarea-tutorials needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dotnet/website-feedback#1779 ·
-
[Bug] SwipeControl in Execute mode with more than one item replaces the whole UI with an error panelAbiertobug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
microsoft/microsoft-ui-reactor#1344 ·
Los mantenedores suelen responder en 1 día