Community - SOTI MobiControl

Community - SOTI MobiControl

There's a new home for Articles. Find Articles on Our Product Support Page.

SOTI MobiControl Discussions


  • 0 votes 4 answers

    Is there a script (legacy or java) to relocate devices?

    HI All We are looking to stage/enroll a few thousand devices and we don't want to load all the applications etc at the staging site. Instead, rather have a button on the lockscreen that triggers a move by the user, to the live/infield folder where it will adopt the policies it needs and download the applications etc. Has anyone done this before? Is it possible? Your assistance will be much appreciated.

    Android Scripting
    a year ago
  • 0 votes 2 answers

    Device drag and drop not possible

    Hi community We encounter an issue with Mobicontrol console. Drag and drop of devices is not anymore possible since upgrade from 14.1 to 14.5. Any idea ? thx steve

    Android
    4 years ago
  • 0 votes 5 answers

    Powershell API POST /devicegroups/{path}/members

    I have a script i am trying to get working, which is designed to move a specific device ID to a specific virtual group. I have several other API methods working properly in power-shell, but the POST /devicegroups/{path}/members is not wanting to play nice. Below is my redacted code:    param (         [parameter(mandatory = $true)]         [string]$apiToken,          [parameter(mandatory = $true)]         [string]$DeviceID,          [switch]$disable     )     $Header = @{         "Content-Type"  = "text/json"         "Authorization" = "Bearer $($apitoken)"     }        $DeviceIDs = @("$($DeviceID)")       if ($disable) {         $groupPath = "referenceId:9959e8d1-4878-41e4-ba2d-4765b45f48d3"         $body = @{             "GroupPath" = $groupath             "deviceIds" = $DeviceID         }             $groupPath = [System.Web.HttpUtility]::UrlEncode($groupPath)         $workingURL = "https://###REMOVED###/MobiControl/api/devicegroups/$($grouppath)/members"                  Write-verbose $body         write-verbose $DeviceID                $result = Invoke-restmethod -Uri $workingURL -Method POST -Headers $Header -Body $body                  $groupPath = "referenceId:23429449-fa78-44b6-9896-65499fe7b27d"         $body = @{             "GroupPath" = $groupath             "deviceIds" = $DeviceID         }                  $groupPath = [System.Web.HttpUtility]::UrlEncode($groupPath)                 $workingURL = "https://###REMOVED###/MobiControl/api/devicegroups/$($grouppath)/members"                  Write-verbose $body         write-verbose $DeviceID             $result = Invoke-restmethod -Uri $workingURL -Method POST -Headers $Header -Body $body         return $result               }     else {         $groupPath = "referenceId:9959e8d1-4878-41e4-ba2d-4765b45f48d3"         $body = @{             "GroupPath" = $groupPath             "deviceIds" = $DeviceID         }                 $groupPath = [System.Web.HttpUtility]::UrlEncode($groupPath)         $workingURL = "https://###REMOVED###/MobiControl/api/devicegroups/$($grouppath)/members"         Write-output $body         write-verbose $DeviceID                  $result = Invoke-restmethod -Uri $workingURL -Method POST -Headers $Header -Body $body         return $result      }               }     After running it i receive the following api response:   Invoke-restmethod : { "$type": "ErrorDetails", "ErrorCode": 0, "Message": "Contract validation failed", "Data": [ "deviceIds: Error parsing value" ], "HelpLink": null}   No matter how i pass the deviceids value it always returns a parse error.   I have tried the following   the device ID in an array the device ID in quotes device ID in square brackets those three converted to json     The only time i have gotten it to work was on the API documentation page on my server

    SOTI MobiControl
    5 years ago

Top 3 Contributors of The Week

View All

Earn Contributor Badge

More info
  • Diamond
    Diamond New !

    Top-tier experts who are delivering outstanding content. Should have more than 7000 points.

  • Platinum

    Experts who are consistent with great content. Should have more than 1000 points

  • Gold

    Highly experienced members with valuable inputs. Should have more than 700 points

  • Silver

    Beginners taking the initiative. Should have more than 500 points