microsoftgraph / microsoftgraph/msgraph-metadata

Commit Win32LobApp missing `deviceAppManagement/mobileApps/{id}/microsoft.graph.win32LobApp/contentVersions/{contentVersionId}/files/{fileId}/commit`

Open
#565 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

ToTriage
Dominant language
XSLT
Stars
166
Forks
55
Avg merge
16h 12m
Merged PRs (30d)
14

Description

There is absolutely no documentation on how to commit a file once uploaded.

Related missing paths:

  • deviceAppManagement/mobileApps/{appId}/microsoft.graph.win32LobApp/contentVersions
  • deviceAppManagement/mobileApps/{appId}/microsoft.graph.win32LobApp/contentVersions/{contentVersionId}/files
  • deviceAppManagement/mobileApps/{appId}/microsoft.graph.win32LobApp/contentVersions/{contentVersionId}/files/{fileId}
  • deviceAppManagement/mobileApps/{appId}/microsoft.graph.win32LobApp/contentVersions/{contentVersionId}/files/{fileId}/commit

Working solution for other facing this issue

Here is my Graph SDK .NET hack extension method (as part of WinTuner):

    public static Task Intune_CommitWin32LobAppContentVersionFileAsync(this GraphServiceClient graphServiceClient, string win32LobAppId, string contentVersionId, string mobileAppContentFileId, FileEncryptionInfo fileEncryptionInfo, CancellationToken cancellationToken = default)
    {
        ArgumentNullException.ThrowIfNull(graphServiceClient);
        ArgumentException.ThrowIfNullOrEmpty(win32LobAppId);
        ArgumentException.ThrowIfNullOrEmpty(contentVersionId);
        ArgumentException.ThrowIfNullOrEmpty(mobileAppContentFileId);
        ArgumentNullException.ThrowIfNull(fileEncryptionInfo);
        var body = new MobileAppContentFileCommitBody
        {
            FileEncryptionInfo = fileEncryptionInfo,
        };
        var data = JsonSerializer.SerializeToUtf8Bytes(body, new JsonSerializerOptions { PropertyNamingPolicy = JsonNamingPolicy.CamelCase });
        var requestInfo = new RequestInformation
        {
            HttpMethod = Method.POST,
            Content = new MemoryStream(data),
            URI = new Uri($"https://graph.microsoft.com/beta/deviceAppManagement/mobileApps/{win32LobAppId}/microsoft.graph.win32LobApp/contentVersions/{contentVersionId}/files/{mobileAppContentFileId}/commit"),
        };
        requestInfo.Headers.Add("Content-Type", "application/json");
        return graphServiceClient.RequestAdapter.SendNoContentAsync(requestInfo, errorMapping: ErrorMapping, cancellationToken: cancellationToken);
    }

This issue is related to #510 as in things missing in the app management stuff.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the four missing Microsoft Graph paths in the issue and review the related #510 discussion. Use GraphServiceClientExtensions.cs in the linked WinTuner example to understand the commit operation and compare it with existing app-management metadata. Done means the content-version, file, and commit paths are documented with the required commit request details.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api, documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.