Class UserGroup


  • public class UserGroup
    extends AbstractService
    Provides a UserGroup SharePoint web service class.

    User Group SharePoint Example

    The Groovy script example below illustrates using the UserGroup service to create an User object representing User Info. In this example a login name is provided via the loginName String.

     import com.avoka.component.sharepoint.SPClient
     import com.avoka.component.sharepoint.service.UserGroup
     import com.avoka.component.sharepoint.type.User
    
     // Create a SharePoint client using the service parameters map with the configured connection details
     def spClient = new SPClient(serviceParameters)
    
     // Create a UserGroup web service
     def userGroupService = spClient.getUserGroup()
    
     // Get a User object for the given login name
     def user = userGroupService.getUserInfo(loginName)
    
     // Get data from user object
     def login = user.getLoginName()
     def name = user.getName()
     def email = user.getEmail() 
    Since:
    3.5.0
    • Constructor Detail

      • UserGroup

        public UserGroup​(SPConnection sharePointConnection)
        Instantiate the UserGroup Interface wrapper with SharePoint Connection context
        Parameters:
        sharePointConnection - SharePoint connection context
    • Method Detail

      • getUserInfo

        public User getUserInfo​(String loginName)
                         throws SPException
        Get information on a specific User.

        Groovy Example

        The Groovy script example below illustrates using the UserGroup service to create an User object representing User Info. In this example a login name is provided via the loginName String.

         import com.avoka.component.sharepoint.SPClient
         import com.avoka.component.sharepoint.service.UserGroup
         import com.avoka.component.sharepoint.type.User
        
         // Create a SharePoint client using the service parameters map with the configured connection details
         def spClient = new SPClient(serviceParameters)
        
         // Create a UserGroup web service
         def userGroupService = spClient.getUserGroup()
        
         // Get a User object for the given login name
         def user = userGroupService.getUserInfo(loginName)
        
         // Get data from user object
         def login = user.getLoginName()
         def name = user.getName()
         def email = user.getEmail() 

        Web Service Method

        The Microsoft SharePoint Web Service SOAP Method:

        http://schemas.microsoft.com/sharepoint/soap/GetUserInfo

         

        Parameters:
        loginName - User name (DOMAIN\User_Alias) of the user.
        Returns:
        User representing the User Info.
        Throws:
        SPException - in case of SharePoint error response