Columbus Endpoint Management User Group

 View Only
  • 1.  Workflow: How can I get assets assigned to a user?

    Posted Aug 06, 2013 01:56 PM

    This should be easy and it seems like the built-in compents should do this, but I need to get a list of all assets owned by a user from SMP 7 and I have the user's Active Directory info (ADUserInfo).  Was thinking I could use the "Common Name" attribute and map that to the "Name" attribute in the Get Assets for User component editor but not so much.  Errors out stating the guid (all zeros) is invalid.

    Aside from manually querying my CMDB with SQL in Workflow, does anyone have any good solutions?

     

    The context for this is that I'm trying to automate our offboarding process and need to provide the person filling out the form (HR) with a list of all company-owned assets the selected user has in their possession.



  • 2.  RE: Workflow: How can I get assets assigned to a user?

    Posted Aug 13, 2013 11:12 AM

    After a few tries with this component I finally got it to work by hardcoding a guid from the vRM_User_Item table. I would assume there is a component that could pull this info for you but I didn't see it.

     

    I know you mentionend you didn't really want to query the cmdb with SQL but I find it to be a lot faster for my processes overall. In general the components are wrapped around web services that end up hitting sql so you're just skipping a few steps. 

    If nothing else you could query the vRM_User_Item table then just pass the guid to the Get Asset for User by ID component.



  • 3.  RE: Workflow: How can I get assets assigned to a user?
    Best Answer

    Posted Aug 13, 2013 11:22 AM

    The Get User by User ID and Domain will get the correct GUID for you. Just put this before your asset component and pass it the result and you should be in business.



  • 4.  RE: Workflow: How can I get assets assigned to a user?

    Posted Aug 13, 2013 11:37 AM

    *Edit Yes, the above (from b3tts32) worked fine for me. I was able to map the output from the "Get user by id and domain" component to an AltirisOutput7.User data type (as the ID field) and it worked like a charm!



  • 5.  RE: Workflow: How can I get assets assigned to a user?

    Posted Aug 15, 2013 02:43 PM

    I got your solution to work, but I see what you mean how ugly this is.  I noticed the list it spits out isn't exactly display friendly, so I think I'm going to go the SQL route and either toss some customized stored procedures in there that I can pass an Active Directory user ID to or do a custom SQL query.

    Now it's time to pull up the workflow swat videos on doing SQL queries ;)