New-MgSiteItem General Exception While Processing
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia dal punto di ingresso New-MgSiteListItem e riproduci il POST a /sites/{site-id}/lists/{list-id}/items usando il payload mostrato, quindi confrontalo con una richiesta che omette Website. Il lavoro è completato quando è possibile creare un elemento dell’elenco contenente un campo hyperlinkOrPicture senza la 500 generalException segnalata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Describe the bug
Playing around to test the fix for New-MgSiteList, I created a list as follows:
$params = @{
displayName = "Books"
columns = @(
@{
name = "Author"
text = @{ texttype = "plain | richtext" }
}
@{
name = "PageCount"
number = @{ displayas = "number | percentage" }
}
@{
name = "Website"
hyperlinkOrPicture = @{ isPicture = "false" }
}
)
list = @{
template = "genericList"
}
}
I can add items to the list with SharePoint Online. But when I attempt to add an item with New-MgSiteListItem, it barfs over the website field (the call works if the Website field is omitted).
$NewItemParameters = @{
fields = @{
Title = 'PowerShell SDK'
Author0 = 'John Smith'
PageCount = '250'
Website = 'https://books.com/joy'
}
}
$NewItem = New-MgSiteListItem -SiteId $site.Id -ListId $List.Id -BodyParameter $NewItemParameters
New-MgSiteListItem_Create: General exception while processing
Status: 500 (InternalServerError)
ErrorCode: generalException
Date: 2024-08-14T12:46:32
Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : 9283d976-9b0d-4392-9db8-41e89f82743e
client-request-id : b4496d6e-9a93-4868-8826-9ed75019e7a9
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"DU2PEPF0002D4A6"}}
Date : Wed, 14 Aug 2024 12:46:32 GMT
Expected behavior
The New-MgSiteListItem cmdlet should work with fields marked as hyperlinkOrPicture
How to reproduce
Run the steps as shown above.
SDK Version
2.22
Latest version known to work for scenario above?
Never known to work
Known Workarounds
No response
Debug output
Click to expand log
``` $NewItem = New-MgSiteListItem -SiteId $site.Id -ListId $List.Id -BodyParameter $NewItemParameters -debug DEBUG: [CmdletBeginProcessing]: - New-MgSiteListItem begin processing with parameterSet 'Create'. DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'. DEBUG: [Authentication]: - Scopes: [Directory.AccessAsUser.All, Directory.ReadWrite.All, email, Files.Read.All, InformationProtectionPolicy.Read, openid, Policy.ReadWrite.Authorization, profile, RecordsManagement.Read.All, Sites.Manage.All, Sites.ReadWrite.All, User.Read, User.Read.All, User.ReadWrite, User.ReadWrite.All, UserAuthenticationMethod.ReadWrite.All].Confirm
Are you sure you want to perform this action?
Performing the operation "New-MgSiteListItem_Create" on target "Call remote 'POST /sites/{site-id}/lists/{list-id}/items' operation".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
POST
Headers:
FeatureFlag : 00000043
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-IE),PowerShell/7.4.4
Accept-Encoding : gzip
SdkVersion : graph-powershell/2.22.0
client-request-id : 42d90d93-a26f-489d-865d-bae424842752
Body:
{
"fields": {
"Website": "https://books.com/joy",
"Title": "PowerShell SDK",
"Author0": "John Smith",
"PageCount": "250"
}
}
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
InternalServerError
Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : bfa8f0e4-059b-49f9-945d-e7ead38a25c8
client-request-id : 42d90d93-a26f-489d-865d-bae424842752
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"DU2PEPF000107E5"}}
Date : Wed, 14 Aug 2024 12:52:30 GMT
Body:
{
"error": {
"code": "generalException",
"message": "General exception while processing",
"innerError": {
"date": "2024-08-14T12:52:30",
"request-id": "bfa8f0e4-059b-49f9-945d-e7ead38a25c8",
"client-request-id": "42d90d93-a26f-489d-865d-bae424842752"
}
}
}
New-MgSiteListItem_Create: General exception while processing
Status: 500 (InternalServerError)
ErrorCode: generalException
Date: 2024-08-14T12:52:30
Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : bfa8f0e4-059b-49f9-945d-e7ead38a25c8
client-request-id : 42d90d93-a26f-489d-865d-bae424842752
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"North Europe","Slice":"E","Ring":"4","ScaleUnit":"001","RoleInstance":"DU2PEPF000107E5"}}
Date : Wed, 14 Aug 2024 12:52:30 GMT
DEBUG: [CmdletEndProcessing]: - New-MgSiteListItem end processing.
Configuration
Windows 11
Other information
No response
- Lingua principale
- C#
- Stelle
- 898
- Fork
- 230
- Merge medio
- 2g 5h
- PR unite (30g)
- 31
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoftgraph/msgraph-sdk-powershell
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
-
status:waiting-for-triage type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
status:waiting-for-triage type:bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 72/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
status:waiting-for-triage type:bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
Tutte le issue di microsoftgraph/msgraph-sdk-powershell
Issue simili
-
bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
sillsdev/languageforge-lexbox#2665 ·
-
bug documentation frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
azurenoops/spin_agent#975 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
SubtitleEdit/subtitleedit#15108 · 1 commento ·