cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Add Users Without Importing From Deployment Technology

dbeckner
By Level 10 Champion
Level 10 Champion

We are building a staging environment and at this time we are unable to hook into our deployment technology due to some outages and instability. I'm looking to test other deployment methods (add users to security groups via general catalog items for virtual app deployment). I looked through the API documentation for a way to PUT users into the system.

How do you add imported users and computers into the tool without hooking into a deployment technology or is this a firm requirement?

I have not explored direct database inserts yet, but I wanted to check here first.

TIA

@CharlesW @jdempsey 

(1) Solution

To do this without a deployment system, you'll leverage the custom sync queries.  You'll find information about that in our product documentation here.  In a nutshell, you'll need to add your own custom User ID Sync SQL Query, User Sync SQL Query, and User Sync Connection String (if you want computer information and user/computer relationship information, you'll need to fill in those custom queries and connection strings as well).  The documentation includes the default queries for SCCM, but you can adapt them to any SQL data source, as long as you map all the necessary values to the right field names.  If you have an existing SQL data source that you'd like to use, you can simply remap the column names from the default query to match the column names in your custom source.  If you don't have an existing SQL data source, you can always create a custom table in the App Broker database and populate that with the data you need (e.g. you could have a Windows scheduled task that runs a PowerShell script to query Active Directory or another LDAP source and populate the user data into a custom table).  Please note that when you use this non-SQL source option, you won't directly populate the WD_User, WD_Computer, or WD_UserComputerMap tables.  Instead, you populate your own custom staging tables (either in the App Broker database or elsewhere), and then you use the custom sync queries in the App Broker UI to query the data from those staging tables into the appropriate built-in tables.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

View solution in original post

(4) Replies

To do this without a deployment system, you'll leverage the custom sync queries.  You'll find information about that in our product documentation here.  In a nutshell, you'll need to add your own custom User ID Sync SQL Query, User Sync SQL Query, and User Sync Connection String (if you want computer information and user/computer relationship information, you'll need to fill in those custom queries and connection strings as well).  The documentation includes the default queries for SCCM, but you can adapt them to any SQL data source, as long as you map all the necessary values to the right field names.  If you have an existing SQL data source that you'd like to use, you can simply remap the column names from the default query to match the column names in your custom source.  If you don't have an existing SQL data source, you can always create a custom table in the App Broker database and populate that with the data you need (e.g. you could have a Windows scheduled task that runs a PowerShell script to query Active Directory or another LDAP source and populate the user data into a custom table).  Please note that when you use this non-SQL source option, you won't directly populate the WD_User, WD_Computer, or WD_UserComputerMap tables.  Instead, you populate your own custom staging tables (either in the App Broker database or elsewhere), and then you use the custom sync queries in the App Broker UI to query the data from those staging tables into the appropriate built-in tables.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

Thanks @jdempsey This is exactly what I'm looking for. We are using custom queries already to import more data from SCCM than is in the default query, but I did not think to just pull from another table or source.

 

When we finally hook into the deployment technology what is the best practice for ensuring we don't end up with duplicate users since the source will change? Will App Portal merge users based on certain synonymous fields or should we purge the WD_User, WD_Computer, or WD_UserComputerMap tables before importing from SCCM?

That's a good question, and I'm not quite sure what the right answer is.  I think the users/computers will merge based on username/computername, but you may end up with duplicate relationship data in WD_UserComputerMap because the relationship "type" will change.  If that happens, just bulk delete all of the older relationships, using the type as a filter.

Anything expressed here is my own view and not necessarily that of my employer, Flexera. If my reply answers a question you have raised, please click "ACCEPT AS SOLUTION".

Thank you @jdempsey I will respond back when I complete the process to confirm what I did (merge or bulk delete) in case anyone else has the same question.