Update-MgDriveItemRetentionLabel Fails with "Empty correlation Guid"
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
- 30/100
Línea de trabajo
Comienza con el cmdlet Update-MgDriveItemRetentionLabel y la llamada equivalente a Invoke-MgGraphRequest contra el punto de conexión documentado de driveItem retentionLabel. Compara el comportamiento entre las versiones 2.25 y 2.29 del SDK usando los detalles de reproducción; el trabajo se considera terminado cuando se haya identificado si la regresión está en el SDK o en el servicio de Graph y se haya registrado una corrección verificada o un hallazgo del lado del servicio.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the bug
I am trying to update a retention label on a file using code that's been working for months. Now it's failing with a "Empty correlation Guid" error.
I suspect that the underlying Graph API https://learn.microsoft.com/en-us/graph/api/driveitem-setretentionlabel?view=graph-rest-1.0&tabs=powershell is failing because invoking the API with Invoke-MgGraphRequest also fails. There's also been problems reported in the SharePoint PnP module that seems to be dependent on the Graph API (see https://github.com/pnp/powershell/discussions/5021 and https://learn.microsoft.com/en-us/answers/questions/4376864/error-applying-retention-label-to-sharepoint-docum)
Expected behavior
I expect that code like this will work:
$Global:NewRetentionLabelParameters = @{}
$NewRetentionLabelParameters.Add("Name",$NewLabel.DisplayName)
$Status = Update-MgDriveItemRetentionLabel -DriveId $OneDriveInfo.Id -DriveItemId $File.Id -BodyParameter $NewRetentionLabelParameters
All the parameters are valid in terms of drive identifier, file identifier, and the name of a retention label to apply. The result is:
Update-MgDriveItemRetentionLabel_UpdateExpanded: Value cannot be null.
Parameter name: Empty correlation Guid
Status: 400 (BadRequest)
ErrorCode: notSupported
Date: 2025-07-18T14:29:28
Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : f4133861-bcc0-46ac-bcd4-13ea117756d7
client-request-id : 3924d5e7-538f-4b38-92b4-18bc473963ac
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"000","RoleInstance":"DU6PEPF00020C21"}}
splogid : d801b3a1-e03d-d000-68cc-f115af2a8ef9
Date : Fri, 18 Jul 2025 14:29:28 GMT
Recommendation: See service error codes: https://learn.microsoft.com/graph/erro
How to reproduce
Select a retention label.
Select a target file in a SharePoint site or OneDrive account.
Get the identifiers for the drive and file.
Build a hash table to hold the details of the retention label to apply.
Run the cmdlet.
SDK Version
V2.29
Latest version known to work for scenario above?
V2.25
Known Workarounds
None. This fails too:
$Uri = ("https://graph.microsoft.com/v1.0/drives/{0}/items/{1}/retentionLabel" -f $OneDriveInfo.Id, $File.Id)
invoke-mggraphrequest -uri $Uri -method Patch -Body $Params
Debug output
Click to expand log
HTTP Method:
PATCH
Absolute Uri:
https://graph.microsoft.com/v1.0/drives/b%21_xwZzApnQEeEWOYGdTfHR_FlEFWmBHlJixksigwWMZ_hpEW05Pd_R7OzPT4YdqXq/items/01R343MZ43HNLCSCCT3ZBLLUIJGB3GJ5B3/retentionLabel
Headers:
FeatureFlag : 00000003
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.26100; en-IE),PowerShell/7.5.2
SdkVersion : graph-powershell/2.29.0
client-request-id : 7033f685-5196-4f65-bad8-60a0be80d6cc
Accept-Encoding : gzip,deflate,br
Body:
{
"name": "Retain for 20 Years"
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
BadRequest
Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 3698b840-89fa-4f60-b9f8-2471e22b1a83
client-request-id : 7033f685-5196-4f65-bad8-60a0be80d6cc
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"007","RoleInstance":"DU6PEPF0000B5D7"}}
splogid : 5f02b3a1-3001-d000-358d-39a682c8eba5
Date : Fri, 18 Jul 2025 14:38:40 GMT
Body:
{
"error": {
"code": "notSupported",
"message": "Value cannot be null.\r\nParameter name: Empty correlation Guid",
"innerError": {
"date": "2025-07-18T14:38:40",
"request-id": "3698b840-89fa-4f60-b9f8-2471e22b1a83",
"client-request-id": "7033f685-5196-4f65-bad8-60a0be80d6cc"
}
}
}
Update-MgDriveItemRetentionLabel_Update: Value cannot be null.
Parameter name: Empty correlation Guid
Status: 400 (BadRequest)
ErrorCode: notSupported
Date: 2025-07-18T14:38:40
Configuration
No response
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
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
MicrosoftLearning/PL-400_Microsoft-Power-Platform-Developer#231 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
joinrpg/joinrpg-net#5313 ·
Los mantenedores suelen responder en 1 día
-
[12.x] FixIncorrectOwnerIdRelationships can delete legitimate library roots when UserView shares the same pathPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día