Automatically adding users to assets

Hello,

We are creating a new user onboarding workflow.  As part of the onboarding, we'd like to assign all users several software assets (like MS Licensing, for example).  

We'd like to automate adding the new user to the assets by making it part of a web service step in a workflow.

Researching the questions in TDX Solutions finds some questions about similar operations.  But the answers get confusing.  We have some questions we were wondering if you could help answer:

1) Some replies to Asset API questions redirect the person asking to use the asset import tool.  Seeing those replies make us think trying to make it part of workflow might not be the best idea.  Is doing what we want to do through a workflow feasible?

2) We see that there is no Endpoint for patching a user to an asset and only a post method.  The description includes a "resourceID" for one of the parameters:   POST https://aces.teamdynamix.com/TDWebApi/api/{appId}/assets/{id}/users/{resourceID}

But we aren't clear on exactly what that is.  Do you have an example of that?  The parameter description just says "the URI of the resource".  

3) Also, are there any examples of how we might accomplish what we want to do?  We're looking for something like this article:
https://solutions.teamdynamix.com/TDClient/1965/Portal/KB/ArticleDet?ID=18758
That gave a nice example of how to change the status of a ticket.

4) Finally, is this something that could be accomplished easier using iPaas?  We don't currently subscribe to iPaas.

Thank you for any help you can provide.

-Jim
 

Asked by James Moyle on Wed 11/30/22 1:42 PM
Sign In to leave feedback or contribute an answer

Answer (1)

This answer has been marked as the accepted answer
Mark Sayers Wed 11/30/22 3:33 PM

Hello James,

  1. You could use web service method steps to make an API call to the  POST TDWebApi/api/{appId}/assets/{id}/users/{resourceID} endpoint to add the user as a resource of each of those assets. I'm not sure if that gets you exactly what you want but it could get you close maybe if you're just tracking your "used" licenses for each software against the active User count for the asset.
  2. The ResourceID is just the UID of the person in question. In everyone's account in TDAdmin, if you look at the very end of the URL for the window displaying their account info after you open it, the last part after the "&U=" of the URL is the value that would go into that endpoint.
  3. It would just be a web service method with the URL POST to that endpoint, with the ResourceID being a parameter like {{resourceID}}. Then you make a Parameter that references the RequestorUID from the ticket.
  4. iPaaS could certainly achieve this, yes. I don't know that for that particular action it would be any faster than the workflow option, but it certainly has other benefits and potentially could do more for you in one shot (ie with one workflow step) rather than having to build multiple web service method steps.
No feedback
Hi Mark,
Thanks for the quick response. As usual, you're extremely helpful. Got it all working perfectly. Knowing what the resourceID referred to was the missing link.
-Jim
- James Moyle Thu 12/1/22 10:00 AM