Jump to content

SamS

Hornbill Developer
  • Posts

    1,511
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by SamS

  1. Hi @Jim,

    So, I can confirm from the code that the 2044 number you are looking at is the number returned from InTune MINUS any items removed by the local "AdditionalFilters".

    As you suggest there should be 60 more CIs, the trick would be identifying which smart phone(s) did NOT come across and then hone in on the "why" that may be. eg if you have serial number set up as the unique identifier, then two items with the same serial number would be identified as a single unit within Hornbill/the import utility - whereas InTune might recognise them as two separate items.

  2. Hi @Osman,

    That error means that the account which is running the utility doesn't match the account for which the import.cfg was created.

    This is often the case where the Windows Task Scheduler is set up to run the utility in the context of a dedicated service account, but testing has been done with a (different) regular user account.

    In this case you have likely tested against your own account and have the scheduled task run with the service account. Either run the scheduled task under your account (so you can see it working) or, assuming you have the details for the service account, remove the import.cfg and run the utility under the service account (to enter the instance ID and API key again) after which the scheduled task should work.

  3. Our User import tool does such: https://github.com/hornbill/user-import-database & documentation: https://docs.hornbill.com/data-imports-guide/users/database/overview

    To be fair, the CSV import works via an ODBC connection. There is a to-do item on the dev list to remove that extra step, but, as the ODBC-route currently works, the priority of this to-do item is low. Either way, any changes there would only affect the source configuration and probably not the mapping.

  4. Hi @Kris,

    Since Intune asset import can now be done via the regular asset import utility, I would recommend using that instead - as the PowerShell script route gives a headache with dependencies and the further coding that is necessary (i.e. the script is provided as-is and would require some re-coding for anyone to make adequate use of it (i.e. to separate out Asset Types etc)).

    The regular asset import utility can be found here: https://github.com/hornbill/asset-import/releases/latest

    The documentation of which is referred to in the README: https://docs.hornbill.com/data-imports-guide/

  5. Hi @Jim,

    So there are two numbers of import:

    1) how many items returned on the (empty) query from Intune

    2) the amount of items the utility is updating.

    If I read your post correctly, then you are suggesting that the first number is incorrect. If so, please confirm what https://graph.microsoft.com/v1.0/deviceManagement/managedDevices is returning via https://developer.microsoft.com/en-us/graph/graph-explorer (you will need to log in via the same account as used with the KeySafe entry creation) because that is what Intune is returning to our utility. If the number is discrepant here, then I would have to direct you to your Intune documentation. IF the number here IS what you were expecting, please let us know, because then some assets are dropping off on our side...

    The latter number could be discrepant because of various reasons, eg certain assets are skipped (no changes detected) or do not drop into any of your filters (also: please confirm that managedDeviceOwnerType is listed in the Intune.Fields array - it is there by default, so I suspect it is).

     

  6. Hi @Jim,

    I am assuming that you are referencing the OData Query. If that is the case, please confirm (eg in ... ) that you are indeed getting back what you are expecting from InTune directly.

    There are a few known issues with InTune's OData implementation (i.e. one can't use startswith on the OS field and null queries are also shaky).

    I would personally recommend to not rely on the OData Query (yet) and do the filtering after the utility extracts the data using AdditionalFilters. Yes, that does mean that if you want to only process 2 items, all devices will be extracted up front. Inefficient, but it should work.

  7. @ilyaas,

    Could it be that the KeysafeKeyID in the configuration file is set as a string instead of an integer?

    "KeysafeKeyID": "123"

    whereas it should be:

    "KeysafeKeyID": 123

    Note the missing set of double-quotes.

    I'm going by the source-code of the utility here and not by confirming it separately.

  8. Hi @Everton1878,

    Curious, because that is pretty much the resulting SQL.

    Are you sure you are not running with -dryrun? And how are you checking whether the asset still exists? If one leaves the browser open on the particular asset's details page, then a refresh (Ctrl-F5) will likely be required in order for the browser to know the asset doesn't exist anymore.

    Assuming you are affirmative on the above, could you please ensure the query results in at least TWO items...(*)

    (*) there's a very old edge-case which I am suspecting here. IF I have time this afternoon, I will run through this edge-case myself, but no promises.

  9. Hi @Everton1878,

    As mentioned above, I've had a look at the code.

    Could you please run the following on your system (using Database Direct) and let me know what the result is:

    SELECT                                           
        COUNT(DISTINCT a.h_pk_asset_id) AS count
    FROM
        h_cmdb_assets a
    JOIN
        h_cmdb_asset_types AS t ON (a.h_type = t.h_pk_type_id)
    JOIN h_cmdb_assets_computer AS ext ON a.h_pk_asset_id = ext.h_pk_asset_id 
    WHERE
        t.h_class = 'computer' AND (TIMESTAMP(ext.h_last_logged_on) <= TIMESTAMP('2024-03-16 00:00:00'))

     

  10. Hi @Everton1878,

    I am pretty sure computer is not a valid Asset Class(*). I am quite sure you would need EITHER computerSystem OR AssetsComputer.

    The former is the more likely, but do please try the latter before you let us know of success (or not - and I will doublecheck the code).

    (*) I just checked the utility's documentation: it suggests computer should be OK. I'll double-check the code.

    -----

    I have confirmed in code that the documentation IS correct and, thus, computer IS the correct Asset Class to be used here.

  11. Hi @mmensah,

    You are trying to assign ownership to a TEAM and not to an individual. The owner of a Task should be an individual user. This user has the ability to do whatever necessary to the task (eg to re-assign the task), so probably best given to a manager or so (eg yourself or "System Administrator").

    There is also a "Task Assignment" which is who is WORKING on the Task. I suspect that that is what you want to use here, as that CAN be a Team. Currently you have that assigned to "System Administrator". If you select "Assign to Variable" from the dropdown currently labeled "Assign to User", then place the TeamId variable there, then that should work.

    • Like 1
  12. Hi @samwoo,

    I didn't think it mattered (and it MIGHT not), but could you please add "memberof" as an attribute to the Atrributes-list in the "LDAP Query"-section on the "LDAP Server"-tab.

    Please keep it all lowercase (i.e. "memberof") and see what happens. IF "memberOf" (notice the camel-caps) is already listed, please remove that version (and for completeness, "memberOf" might also be tested).

    Please let us know the results.

×
×
  • Create New...