Assign a WLAN configuration to a user account

To assign a WLAN configuration to a user account, you can use the assignWLANConfigurationToUser() method.
Before you begin: Retrieve the following variables:
  • userID integer for the user account that you want assign the WLAN configuration to
  • configName string for the name of the WLAN configuration
  1. Invoke findWLANConfigurations() to retrieve all WLAN configurations.
    boolean includePolicyItems=true;
    FindWLANConfigurationsResult WLANConfigurationsResult = coreWebService.findWLANConfigurations(locale, includePolicyItems);
  2. Check the result for errors and handle any errors.
    if (WLANConfigurationsResult.getFindWLANConfigurationsReturnStatus().getCode()!= FindWLANConfigurationsReturnStatusEnumType.SUCCESS) 
           // handle any errors
  3. Search for the WLAN configuration that you want to assign to the user account.
    if (WLANConfigurationsResult.getITPolicies().size()> 0) 
           for (ITPolicy itr:WLANConfigurationsResult.getITPolicies()) 
  4. Retrieve the WLAN configuration ID.
                 int WLANConfigId=WLANConfigurationsResult.getITPolicies().get(0).getPolicyId();
  5. Invoke assignWLANConfigurationToUser() method.
                 AssignWLANConfigurationToUserResult result = coreWebService.assignWLANConfigurationToUser(WLANConfigId, userId);
  6. Check the result for errors and handle any errors.
                 if (result.getAssignWLANConfigurationToUserReturnStatus().getCode() != AssignWLANConfigurationToUserReturnStatusEnumType.SUCCESS) {
                           //handle any errors

Was this information helpful? Send us your comments.