I see that by using the DataMiner Web Services API, they can use the GetUsers | DataMiner Docs and GetUserGroups | DataMiner Docs methods to get information on the Users and UserGroups, but I didn't see any ways they can remove users through a similar way or even with an Automation Script. Is this a possibility?
Hi Micah,
Deleting a user can be done from an Automation script by sending the internal SetSecurityInfoMessage through Engine:
using Skyline.DataMiner.Net.Messages.Advanced;
var message = new SetSecurityInfoMessage
{
BInfo = 1,
User = "user to delete",
What = 9,
};
engine.SendSLNetSingleResponseMessage(message);
Be extremely careful with this operation: it is destructive, and it may be possible to delete the account that is executing the script, potentially locking yourself out of the system. Always test with a disposable local user and verify the target username before sending the message.
I have not verified whether the same approach works for domain users.
Disclaimer
Note that these are internal calls and we do not recommend using them, as it is not officially supported and we cannot guarantee that it will still work in the future. As a rule, you should avoid using SLNet calls, as these are subject to change without notice.
Hi Gelber,
I was able to test that command on a domain user safely and it did work as expected. Thank you for bringing this to my attention!