3 Replies Latest reply on May 16, 2017 9:52 AM by LANDeskWizard

    MBSDK: AddDeviceToScheduledTask always returns false


      I'm unable to add devices to scheduled tasks via the MBSDK anymore. This worked briefly when I was getting started using it but suddenly stopped working shortly afterwards. Using the example implementation on the LDMS server (http://core/MBSDKService/MsgSDK.asmx?op=AddDeviceToScheduledTask) is always unsuccessful, as well as sending the command directly as an HTTP request: http://core/MBSDKService/MsgSDK.asmx/AddDeviceToScheduledTask?taskId=TASKID&deviceName=PCNAME


      After every failed attempt there is a corresponding error in the MBSDK.log file on the LDMS server: "MBSDK : Machine is out of user's scope of machines".


      As far as I can tell, all other operations that go through the MBSDK are still functional, it's this one in particular that is having issues.

        • 1. Re: MBSDK: AddDeviceToScheduledTask always returns false

          Hi CoryJ,

          I am still new to the MBSDK and trying to learn so this may or may not be of use to you:


          Before you call the AddDeviceToScheduledTask method do you call the ResolveScopeRights method?


          If you have any experience with the MBSDK i'd like to hear about it... I think it could help me here in my new position.




          • 2. Re: MBSDK: AddDeviceToScheduledTask always returns false

            Hello everyone,


            I figured out the issue! The real problem here is related to scope inheritance.


            So, I knew the error was something to do with user scope issues because of the errors in the log file. I was in the 'All Devices' scope, but it still wouldn't work even if I called ResolveScopeRights first. It turns out that one of the recent updates broke default scopes.


            My problems began the day after the rollout of this patch: https://community.ivanti.com/downloads/Readme/Pages/LD2016.3.html


            Take note of the 'SDK' section of the changelog: "The "AddDeviceToScheduledTask" MBSDK call may ignore user-limiting scopes in some instances". So it seems like there was a problem with the method sometimes working for users who it shouldn't have worked for. In fixing this issue, either intentionally or accidentally, users who inherited from default user scopes were not able to call this method. As soon as I manually created my own 'All Devices' scope and explicitly added myself to it, the method worked correctly for me.

            • 3. Re: MBSDK: AddDeviceToScheduledTask always returns false
              LANDeskWizard SSMMVPGroup

              Glad I wasn't the only one seeing this. We are on 2017.1 and also saw this and fixed it by directly adding the scope to the user.