Jump to content

SamS

Hornbill Developer
  • Posts

    1,509
  • Joined

  • Last visited

  • Days Won

    25

Posts posted by SamS

  1. 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/

  2. 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).

     

  3. 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.

  4. @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.

  5. 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.

  6. 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'))

     

  7. 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.

  8. 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
  9. 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.

  10. Hi @Claire Holtham,

    It is not possible to publish a report with prompts.

    I am guessing that those "certain staff" do not have (analyst) access to Hornbill?

    You could possibly set up a one question IC (under a Catalog Item) in which a customised form offers the Search All Users (Include user Id in display) so the "certain staff" can deduce whether the User ID exists if the search comes up with/out anything. No need to log a call at that point.

×
×
  • Create New...