A new Flexera Community experience is coming on November 25th, click here for more information.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flexera App Portal - SCCM API - PowerShell Software Order

Dear all
this is about the Flexera App Portal 2022. (sccm in the background)
With the existing api located in your business for sccm server url (https://yourintranetsomething/esd/api.asmx) I am able to place INSTALL orders for software over web application with a powershell like this:
****************
$catalogID = $SccmId
$targetDevice = $NewWsId
$targetUser = $User
$Requester = $Requester
$useApproval = $false
$sendEmail = $true
#$uri = https://yourintranetsomething/esd/api.asmx

$WebService = New-WebServiceProxy -Credential $c -Uri https://yourintranetsomething/esd/api.asmx
$requestID = $WebService.createRequest($catalogID, $targetDevice, $Requester, $targetUser, $useApproval, $sendEmail, @())
$requestID
****************
I wonder if someone knows if there is a keyword for ordering the UNINSTALL of software?

 

(1) Solution
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

The createrRequest() function in API.asmx does not allow you to submit an uninstall request, so this will not work. You could use the REST API to submit an uninstall request if necessary. Take a look at the following community post:

https://community.flexera.com/t5/App-Broker-Forum/ServiceNow-Integration-with-AppPortal-Issue/td-p/206787

I should mentioned that this is more specific to calling the REST endpoint in ServiceNow.. If using powershell/postman, you'd use something similar to the following in the body of the request:

using the following request Body:

"targets":[

      {

         "uniqueUserName":"Support\\UserName",

         "machineName":"ClientApp-Rkt1",

         "catalogs":[

            {
               "ID":60,
                "request":1
            }

         ]

      }

   ]

The important bit is adding  "request":1

View solution in original post

(2) Replies
CharlesW
By Level 12 Flexeran
Level 12 Flexeran

The createrRequest() function in API.asmx does not allow you to submit an uninstall request, so this will not work. You could use the REST API to submit an uninstall request if necessary. Take a look at the following community post:

https://community.flexera.com/t5/App-Broker-Forum/ServiceNow-Integration-with-AppPortal-Issue/td-p/206787

I should mentioned that this is more specific to calling the REST endpoint in ServiceNow.. If using powershell/postman, you'd use something similar to the following in the body of the request:

using the following request Body:

"targets":[

      {

         "uniqueUserName":"Support\\UserName",

         "machineName":"ClientApp-Rkt1",

         "catalogs":[

            {
               "ID":60,
                "request":1
            }

         ]

      }

   ]

The important bit is adding  "request":1

Thanks Charles, not what I wanted to hear but it is what it is.... wanted to avoid changing the code.