SharePoint Graph Module - extend functionality with additional methods - #8318
Conversation
No newline at end of fileThe file ends without a trailing newline (the diff shows the last added line without the standard Unix EOF newline). While AL compilation typically tolerates this, it causes noise in future diffs and violates standard file conventions in the repository. Recommendation:
Line mapping was unavailable, so this was posted as an issue comment. 👍 useful · ❤️ especially valuable · 👎 wrong - reply with why |
|
Build not passing. Merge main in. |
…onalFunctionality
- Reset the mock HTTP handler in place (Reset/ClearAll) instead of Clear(), which detached the instance from an already-initialized client - Queue full Http Response Message objects in the mock handler so headers and reason phrase are preserved; return a diagnostic 500 response instead of a hard error when no mock response is queued - Populate UpdateListItem from the PATCH fieldValueSet response, removing the follow-up GET (one round trip, no false failure after a committed update) - Refresh instead of failing on duplicate Insert when the caller's record already contains the item (GetListItem, UpdateDriveItem) - Add ?expand=fields to the single list item endpoint - Extend tests: buffer reuse, queued header preservation, queue exhaustion diagnostics; document mock response modes
Copilot PR ReviewIteration 2 · Outcome: completed
Knowledge source: https://github.com/microsoft/BCQuality@186d8a131465475c79244d994acb872cd5c0d4bf Findings by domainFindings split into Knowledge-backed (cite a BCQuality article) and Agent (the agent's own judgement, no matching BCQuality rule).
Totals: 0 knowledge-backed · 1 agent findings. Orchestrator pre-filter (2 file(s) excluded)
Findings produced by the Copilot CLI agent against BCQuality at |
|
|
||
| if ItemId = '' then begin | ||
| SharePointGraphResponse.SetError(InvalidItemIdErr); | ||
| Session.LogMessage('', InvalidItemIdErr, Verbosity::Error, DataClassification::SystemMetadata, TelemetryScope::ExtensionPublisher, 'Category', GraphSharePointCategoryLbl); |
There was a problem hiding this comment.
aholstrup how do partners generate the telemetry tags?
Lets setup a pipeline that auto pushes that change?
There was a problem hiding this comment.
Add new readme specific for sharepoint graph module
|
Magnus Hartvig Grønbech (@Groenbech96) Jesper Schulz-Wedde (@JesperSchulz) Should be ready for review/merge, I added new architecture section in main readme of sharepoint module ofc, after new telemetry calls will have new codes |
|
I think someone break my build with wrong number of params for telemetry |
Let's try to rerun this! I'll monitor it 😊 |
Well, I think it's still broken should I fix it...? |
I just quickly looked into the error, and it seems like the system application is broken - unrelated to your PR!? No, you should not look into that! We must fix that right away! It's strange though. Other builds are passing. Let me investigate! |
|
Volodymyr Dvernytskyi (@Drakonian), seems like all build issues are related to your code after all. Please fix your LogMessage calls to use the right amount of parameters. |
I would say Magnus code, but I will fix 👌
|
Remove customer specific data from telemetry Make sure that GetListItem couldn't break next API requests
|
Jesper Schulz-Wedde (@JesperSchulz) Should be ok now |

What & why
The SharePoint Graph module currently supports creating files, folders, and list items ΓÇö but offers no way to modify them after creation. Renaming an uploaded file or updating metadata on a list item are among the most common SharePoint integration scenarios, and their absence forces consumers to drop down to raw HTTP calls.
This PR closes that gap by adding update operations for both drive items and list items, backed by the standard MS Graph PATCH endpoints. It also upgrades the test infrastructure to properly cover multi-step operations that were previously untestable.
Linked work
Fixes #8317
How I validated this
UpdateDriveItemandRenameDriveItemagainst a test SharePoint site ΓÇö file renamed successfully, response parsed intoSharePoint Graph Drive Itemrecord with updated name.UpdateListItemwith a fields payload (Title, custom columns) ΓÇö PATCH succeeded, follow-up GET returned the full list item with updated values.GetListItemfor a single item ΓÇö returned the expected record with all fields (ContentType, WebUrl, timestamps).RenameDriveItemByPathandUpdateDriveItemByPathΓÇö path resolution + PATCH executed as two consecutive HTTP calls, both reflected in mock request log.UpdateListItem_FollowUpGetFailstest ΓÇö when the GET after PATCH returns 404, the error is surfaced to the caller and request count is 2 (PATCH did fire).Risk & compatibility
Fixes AB#640918