From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

how to remove user account

Solved!
Go to solution

My SystemLink Server ( as well as NI webserver) are running under Windows 10.

 

I could create additional user by Adding them as Windows User (password protected).

However, when we removed certain user account from windows, these user still listed in Systemlink server User list. How to delete them?

0 Kudos
Message 1 of 6
(2,229 Views)
Solution
Accepted by ThamS

Hi Guzman2479,

 

It is not currently possible to delete users through the SystemLink web UI.  However, there is API access to add, modify, or delete users.  If you have only a few users to delete, I would recommend just using the Swagger UI installed on the server at <host>/niapis.  From there, first use the dropdown on the top bar to navigate to the User Service.

 

Then, you can find the ID of the user you'd like to delete using POST /users/query, like in this screenshot.  The query uses Dynamic Linq syntax, and the full User model is documented at the bottom of the page for reference.

 

MichaelDB_1-1612295704297.png

 

The response will look something like this.  Note the example curl command actually used to query the server, if you'd like to script this in future.

 

MichaelDB_2-1612295928156.png

 

Using the user ID highlighted in yellow, we can then use DELETE /users/{id} to actually delete the user:

 

MichaelDB_3-1612296005170.png

 

You should see a HTTP 204 response appear below if the user is successfully deleted.

 

You may also want to delete any associated auth mappings through the web UI, just to follow the general security principle of least privilege.  Also be aware that if the same user is added back to the server later, any existing auth mappings may be re-associated, which may or may not be your desired result.

 

You can also script this process if you have many users to delete, using Perl, Python, LabVIEW or any other suitable language.  Take care that your query is carefully written and tested though, as it would be easy to accidentally delete the wrong users.

 

Feel free to ask any follow up questions here, or if you need more detailed assistance you can reach out through a service request.

Michael B.
Product Support Engineer
National Instruments
Message 2 of 6
(2,172 Views)

Hi ThamS,

 

Please see my reply to Guzman in this thread for details on deleting SystemLink users.

Michael B.
Product Support Engineer
National Instruments
Message 3 of 6
(2,170 Views)
Thank you
0 Kudos
Message 4 of 6
(2,154 Views)

Hi @MichaelDB thank you for your reply with solution.

 

I've a question in this case regarding API for LabVIEW:


You can also script this process if you have many users to delete, using Perl, Python, LabVIEW or any other suitable language.  Take care that your query is carefully written and tested though, as it would be easy to accidentally delete the wrong users.

Would you tell me how?

I can't find any Function in LabVIEW palette to the API for managing SystemLink user account or access:

0 Kudos
Message 5 of 6
(2,149 Views)

Hi ThamS,

 

The SystemLink API in LabVIEW doesn't include functions for talking to the user service, but you should be able to use the standard HTTP client palette to call the API endpoints on your server.  Similar to the process in this article: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019VpgSAE&l=en-US

 

The HTTP client documentation is here: https://zone.ni.com/reference/en-XX/help/371361R-01/lvcomm/http_client/

 

Thanks,

Michael B.
Product Support Engineer
National Instruments
0 Kudos
Message 6 of 6
(2,139 Views)