Migrating from Domain Service to the Admin SDK Advanced Services
    
    
      
      
      Stay organized with collections
     
    
      
      Save and categorize content based on your preferences.
     
    
  
  
  
   
  
    
  
  
    
      
  
  
    
      
        outlined_flag 
       
     
    
      
        
          The Domain service for G Suite domain administrators is deprecated and will be turned off.
         
      
        
          The Domain service is being replaced by the Admin SDK Directory and Admin SDK Reports advanced services.
         
      
        
          This page provides a migration path from the old Domain service to the new Admin SDK.
         
      
        
          A comparison table outlines the equivalent methods between Domain service and Admin SDK.
         
      
        
          The Admin SDK offers new features not present in the Domain service, such as device management and reporting.
         
      
     
   
 
    
    
The Domain service , which allows
G Suite domain administrators to manage users and groups, is
deprecated as of May 15, 2014 ,
and will be turned off on
November 20, 2014 . The service is replaced
by the recently added Admin SDK Directory 
and Admin SDK Reports 
advanced services. This page outlines the migration path from Domain service to
its new replacement, Admin SDK.
Method comparison 
The table below provides an overview of the methods used in Domain service and
their equivalent methods (if any) in Admin SDK.
  
    Domain services method 
    Admin SDK method 
   
  
    
    
    DomainGroup.addMember(memberId) 
    
    AdminDirectory.Members.insert(resource, groupKey) 
    role  
  
    
    
    DomainGroup.addOwner(ownerId)  
  
    
    
    DomainGroup.deleteGroup() 
    
    AdminDirectory.Groups.remove(groupKey)  
   
  
    
    
    DomainGroup.getAllMembers() 
    
    AdminDirectory.Members.list(groupKey, optionalArgs) roles  
   
  
    
    
    DomainGroup.getAllOwners()  
  
    
    
    DomainGroup.getDescription() 
    
    AdminDirectory.Groups.get(groupKey) description 
    id 
    name  
   
  
    
    DomainGroup.getId()  
  
    
    
    DomainGroup.getName()  
   
  
    
    
    DomainGroup.getPermissionLevel() N/A 
   
  
    
    
    DomainGroup.removeMember(memberId) 
    
    AdminDirectory.Members.remove(groupKey, memberKey)  
   
  
    
    
    DomainGroup.removeOwner(ownerId)  
  
    
    
    DomainGroup.setDescription(description) 
    
    AdminDirectory.Groups.patch(resource, groupKey) description
    name  
   
  
    
    
    DomainGroup.setName(name)  
  
    
    
    DomainGroup.setPermissionLevel(level) N/A 
   
  
    
    
    DomainNickname.deleteNickname() 
    
    AdminDirectory.Users.Aliases.remove(userKey, alias)  
   
  
    
    
    DomainNickname.getNickname() 
    
    AdminDirectory.Users.Aliases.list(userKey, optionalArgs) aliases primaryEmail  
   
  
    
    
    DomainNickname.getUsername()  
  
    
    
    DomainUser.deleteUser()  
    
    
    AdminDirectory.Users.remove(userKey)  
   
  
    
    
    DomainUser.getAgreedToTerms() 
    
    AdminDirectory.Users.get(userKey) agreedToTerms 
    changePasswordAtNextLogin primaryEmail 
    name.familyName name.givenName isAdmin suspended  
   
  
    
    
    DomainUser.getChangePasswordAtNextLogin()  
  
    
    
    DomainUser.getEmail()  
   
  
    
    
    DomainUser.getFamilyName()  
  
    
    
    DomainUser.getGivenName()  
  
    
    
    DomainUser.getIsAdmin()  
   
  
    
    
    DomainUser.getIsSuspended()  
  
    
    
    DomainUser.getStorageQuota() 
    
    AdminReports.UserUsageReport.get(userKey, date, optionalArgs) total_quota_in_mb  
   
  
    
    
    DomainUser.setChangePasswordAtNext
    Login(changePassword) 
    
    AdminDirectory.Users.patch(resource, userKey) changePasswordAtNextLogin name.familyName name.givenName  
   
  
    
    
    DomainUser.setFamilyName(name)  
  
    
    
    DomainUser.setGivenName(name)  
  
    
    
    DomainUser.setIsAdmin(admin) 
    
    AdminDirectory.Users.makeAdmin(resource, userKey) isAdmin  
   
  
    
    
    DomainUser.setIsSuspended(suspended) 
    
    AdminDirectory.Users.patch(resource, userKey) suspended password primaryEmail  
   
  
    
    
    DomainUser.setPassword(password)  
  
    
    
    DomainUser.setUsername(username)  
  
    
    
    GroupsManager.createGroup(groupId, name, description, permissionLevel) 
    
    
    
    GroupsManager.createGroup(groupId, name) 
    
    AdminDirectory.Groups.insert(resource)  
   
  
    
    
    GroupsManager.getAllGroups() 
    
    GroupsManager.getAllGroups(memberId) 
    
    AdminDirectory.Groups.list(optionalArgs) userKey  
   
  
    
    
      GroupsManager.getDomain() 
      
      NicknameManager.getDomain() 
      UserManager.getDomain() N/A 
   
  
    
    
    GroupsManager.getGroup(groupId) 
    
    AdminDirectory.Groups.get(groupKey)  
   
  
    
    
    NicknameManager.createNickname(username, nickname) 
    
    AdminDirectory.Users.Aliases.insert(resource, userKey)  
   
  
    
    
    NicknameManager.getAllNicknames() N/A 
   
  
    
    
    NicknameManager.getAllNicknames(username) 
    
    AdminDirectory.Users.Aliases.list(userKey, optionalArgs)  
   
  
    
    
    NicknameManager.getNickname(nickname)  
  
    
    
    UserManager.createUser(username, givenName, familyName, password) 
    
    
    
    UserManager.createUser(username, givenName, familyName, password, passwordHashFunction)
     
    
    AdminDirectory.Users.insert(resource) hashFunction  
  
    
    
    UserManager.getAllUsers() 
    
    AdminDirectory.Users.list(optionalArgs) 
    customer 
    domain my_customer alias to
    represent your account's customerId. 
   
  
    
    
    UserManager.getUser(user) 
    
    UserManager.getUser(username) 
    
    AdminDirectory.Users.get(userKey)  
   
New features in Admin SDK 
In addition to the supported methods outlined above, the Admin SDK advanced
services provide the following new features:
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2024-10-31 UTC.