I know this is an old thread but wanted to add a comment. This can be done, I've been working with it this week. There may be better ways but:
Iterating through a list of UserConfigurations:
// First declared the license I wanted, I created a variable for an additional license for my convenience
ConfigurationId I3_ACCESS_RECORDER_QUALITYMONITORING_AGENT = new ININ.IceLib.Configuration.ConfigurationId("I3_ACCESS_RECORDER_QUALITYMONITORING_AGENT");
..
..
ConfigurationManager _configurationManager = ConfigurationManager.GetInstance(session);
UserConfigurationList userConfigurationList = new UserConfigurationList(_configurationManager);
QuerySettings<UserConfiguration, UserConfiguration.Property> newQuerySettings = userConfigurationList.CreateQuerySettings();
newQuerySettings.SetPropertiesToRetrieve(
UserConfiguration.Property.License_AdditionalLicenses
);
newQuerySettings.SetRightsFilterToAdmin();
newQuerySettings.SetFilterDefinition(UserConfiguration.Property.Id, user.UserName, FilterMatchType.Exact);
userConfigurationList.StartCaching(newQuerySettings);
foreach (UserConfiguration configurationObject in userConfigurationList.GetConfigurationList())
{
configurationObject.License.AdditionalLicenses.Value.Add(I3_ACCESS_RECORDER_QUALITYMONITORING_AGENT)
configurationObject.Commit();
}
userConfigurationList.StopCaching();
------------------------------
James Dunn
Pitney Bowes Inc.
------------------------------
Original Message:
Sent: 09-15-2020 11:36
From: Raleigh Beringer
Subject: IceLib - User License Add(s) and Removal(s)
I see in the Statistics library that we can see some licening information and on the user we can see licensing that the user has but is there a way with IceLib SDK that we can programmatically add/Remove specific licensing to a User? If so can someone give a snippet of a hint of how its accomplished.
Thanks in advance.
#Handlers
#Integrations
#SystemAdministration
#Unsure/Other
------------------------------
Raleigh Beringer
Gerber Life Insurance
------------------------------