Error occuring when trying to automate Application Approval Process in C#..

Ani Sankar 1 Reputation point
2021-07-22T20:56:40.32+00:00

We are trying to automate the Application Approval process from a custom C# Application. Basically we are trying to perform the scenario 2 suggested in the below Microsoft URL

https://learn.microsoft.com/en-us/mem/configmgr/develop/apps/application-approval-process

In the above URL, Powershell samples are provided. We couldn't find any .NET sample for the above functionality..

Please see below, our piece of code for automation

Dictionary<string, object> ReqParameters = new Dictionary<string, object>();
ReqParameters.Add("ClientGUID", strClientGUID);
ReqParameters.Add("Username", strUserName);
ReqParameters.Add("ApplicationID", strAppID);
ReqParameters.Add("Comments", strComments);
ReqParameters.Add("AutoInstall", boolAutoInstall);
IResultObject outParam = connection.ExecuteMethod("SMS_UserApplicationRequest", "CreateApprovedRequest", ReqParameters);

Unfortunately we are getting the below error when we tried to execute this

"Details = "ConfigMgr Error Object:\r\ninstance of SMS_ExtendedStatus\r\n{\r\n\tDescription = \"Unable to create application request.\";\r\n\tErrorCode = 1078462208;\r\n\tFile = \"..\\sspuserapplicationrequest.cpp\";\r\n\tLine = 809;\r\n\tOperation = \"ExecMethod\";..."

Any ideas for resolving this....

Microsoft Configuration Manager
0 comments No comments
{count} votes

Your answer

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