Graph API Win32 App Upload Fails with commitFileFailed Error

Brian Balser 40 Reputation points
2025-09-29T21:05:12.9566667+00:00

Encountering issues with uploading a Win32 app using the Graph API. The following steps outline the process and the encountered problem:

  1. Authenticated using client credentials with DeviceManagementApps.ReadWrite.All permission.
  2. File uploads successfully to Azure Blob Storage via AzCopy.
  3. The commit POST request returns a 200 status code (success).
  4. Immediately after, the file state shows uploadState: "commitFileFailed" and isCommitted: false.
  5. This issue persists with both 12GB and 1.5KB .intunewin files.
  6. Encryption information is extracted correctly from detection.xml.
  7. Manual portal upload works fine.
  8. The PowerShell script adheres to the Microsoft Graph API documentation.

The commit payload structure used is as follows:

$encryptionInfoForCommit = [ordered]@{
       encryptionKey = $EncryptionInfo.encryptionKey
       macKey = $EncryptionInfo.macKey
       initializationVector = $EncryptionInfo.initializationVector
       mac = $EncryptionInfo.mac
       profileIdentifier = $EncryptionInfo.profileIdentifier
       fileDigest = $EncryptionInfo.fileDigest
       fileDigestAlgorithm = $EncryptionInfo.fileDigestAlgorithm
}  

Any thoughts or directions on how to resolve this issue? Despite the successful upload and the app appearing in Intune, the commit process fails.

Azure Automation
Azure Automation
An Azure service that is used to automate, configure, and install updates across hybrid environments.
0 comments No comments
{count} votes

Answer accepted by question author
  1. Arne 155 Reputation points
    2025-10-02T15:00:06.3033333+00:00

    We are experiencing the same problem. Haven't found the root cause.
    We recently updated out powershell version to 7.3, but have not found a direct link to the issue.

    We are in to progress of testing with a older PS version. Maybe the way the newer PS version handle encoding could be the issue.

    Have not found a mentioned change in the way we upload to the blob-storage.

    1 person found this answer helpful.

Answer accepted by question author
  1. Arne 155 Reputation points
    2025-10-03T12:29:45.7333333+00:00

    Follow-up on our problem, it was indeed a change in behavior with a different PowerShell version.
    (Maybe the same behaviour can be replicated with AZCopy when it uses Invoke-WebRequest and Invoke-RestMethod resting on PowerShell 7.4)

    A detailed explanation can be found here and how we solved it: https://dutchscriptingguys.com/why-your-intune-file-commits-fail-in-powershell-7-4/


1 additional answer

Sort by: Most helpful
  1. Brian Balser 40 Reputation points
    2025-10-02T15:08:22.7233333+00:00

    Dropping my comment response here just to make the answer (in our case) available to others if they are seeking it.

    "..so it turns out (at least in our case), the problem was using AZCopy instead of chunking the upload. After I changed my approach to use Invoke-Uploadwin32Lob I had success. Still faster than manually uploading through the portal, not as fast, unfortunately, as pushing in one big push using AZCopy. Hoping to resolve some of that with chunk size, et cetera."

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.