Unable to Publish an MSI application to Intune

%3CLINGO-SUB%20id%3D%22lingo-sub-1753536%22%20slang%3D%22en-US%22%3EUnable%20to%20Publish%20an%20MSI%20application%20to%20Intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1753536%22%20slang%3D%22en-US%22%3E%3CP%3EWhile%20trying%20to%20publish%20to%20Intune%2C%20I%20am%20getting%20an%20following%20error%20message%3A%3CBR%20%2F%3E%3CSPAN%3E%26nbsp%3BERROR%3A%20IntunePlugin.AsyncExecutor.RunSync%20-%20Status%20Code%3A%20Unauthorized%20Microsoft.Graph.ServiceException%3A%20Code%3A%20UnknownError%20Message%3A%20%7B%22ErrorCode%22%3A%22Forbidden%22%2C%22Message%22%3A%22%7B%5Cr%5Cn%20%5C%22_version%5C%22%3A%203%2C%5Cr%5Cn%20%5C%22Message%5C%22%3A%20%5C%22An%20error%20has%20occurred%20-%20Operation%20ID%20(for%20customer%20support)%3A%22.%3CBR%20%2F%3E%3CBR%20%2F%3EPlease%20help%20me%20in%20resolving%20this%20issue.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1753536%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EGraph%20API%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EIntune%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1753755%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Publish%20an%20MSI%20application%20to%20Intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1753755%22%20slang%3D%22en-US%22%3E%3CP%3EAdditionally%2C%20I%20have%20given%20the%20following%20permissions%20for%20the%20application%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Shashikiran1985_0-1602075374711.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F224798iBB68E36D1977FC75%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20title%3D%22Shashikiran1985_0-1602075374711.png%22%20alt%3D%22Shashikiran1985_0-1602075374711.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThanks%20in%20Advance.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1754950%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Publish%20an%20MSI%20application%20to%20Intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1754950%22%20slang%3D%22en-US%22%3ECould%20you%20share%20the%20exact%20code%20you%20are%20trying%20to%20use%3F%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1887419%22%20slang%3D%22en-US%22%3ERe%3A%20Unable%20to%20Publish%20an%20MSI%20application%20to%20Intune%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1887419%22%20slang%3D%22en-US%22%3E%3CP%3EHey%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F823319%22%20target%3D%22_blank%22%3E%40Shashikiran1985%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ethe%20Intune%20App%20write%20permission%20write%20is%20a%20%3CSTRONG%3EDelegated%3C%2FSTRONG%3E%20permission%20so%20you%20need%20to%20have%20a%20service%20account%20(an%20user)%20this%20user%20needs%20to%20have%20a%20valid%20Intune%20license%20assigned%2C%20otherwise%20he%20can't%20use%20Graph%20endpoints%20for%20Intune.%20Did%20you%20check%20if%20the%20service%20user%20has%20a%20license%20for%20Intune%20correctly%20assigned%3F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Ebest%2C%3C%2FP%3E%0A%3CP%3EOliver%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

While trying to publish to Intune, I am getting an following error message:
 ERROR: IntunePlugin.AsyncExecutor.RunSync - Status Code: Unauthorized Microsoft.Graph.ServiceException: Code: UnknownError Message: {"ErrorCode":"Forbidden","Message":"{\r\n \"_version\": 3,\r\n \"Message\": \"An error has occurred - Operation ID (for customer support):".

I have given the following permissions for the application.

Shashikiran1985_0-1602075613902.png

Please help me in resolving this issue.
Thanks.

3 Replies
Could you share the exact code you are trying to use?

Hey @Shashikiran1985,

 

the Intune App write permission write is a Delegated permission so you need to have a service account (an user) this user needs to have a valid Intune license assigned, otherwise he can't use Graph endpoints for Intune. Did you check if the service user has a license for Intune correctly assigned?

 

best,

Oliver

@Shashikiran1985  Status Code: Unauthorized--> Refers to the permission related issue.

How are you publishing the app? using script or manual method?

 

Regards,

Eswar