Index: modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/AuthorizationService.java
===================================================================
--- modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/AuthorizationService.java	(revision 60923)
+++ modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/AuthorizationService.java	(revision 60924)
@@ -1,7 +1,14 @@
 package eu.dnetlib.openaire.usermanagement.utils;
 
+import org.mitre.openid.connect.model.OIDCAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Component;
 
+import java.util.ArrayList;
+import java.util.List;
+
 @Component("AuthorizationService")
 public class AuthorizationService {
 
@@ -47,4 +54,30 @@
     public boolean isCommunity(String type) {
         return mapType(type, false).equals("community");
     }
+
+
+    public List<String> getRoles() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        if (authentication != null) {
+            List<GrantedAuthority> authorities = (List<GrantedAuthority>) authentication.getAuthorities();
+            if (authorities != null) {
+                List<String> roles = new ArrayList<>();
+                authorities.forEach((authority) -> {
+                    roles.add(authority.getAuthority());
+                });
+                return roles;
+            }
+        }
+        return null;
+    }
+
+    public String getAaiId() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        return authentication instanceof OIDCAuthenticationToken ? ((OIDCAuthenticationToken)authentication).getSub() : null;
+    }
+
+    public String getEmail() {
+        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+        return authentication instanceof OIDCAuthenticationToken ? ((OIDCAuthenticationToken)authentication).getUserInfo().getEmail() : null;
+    }
 }
Index: modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/RegisteredServicesUtils.java
===================================================================
--- modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/RegisteredServicesUtils.java	(revision 60923)
+++ modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/RegisteredServicesUtils.java	(revision 60924)
@@ -29,7 +29,7 @@
         if (registeredService == null) {
             return false; //no harm in accessing nothing
         }
-       return registeredService.getOwner().equals(userid);
+        return registeredService.getOwner().equals(userid);
     }
 
 }
Index: modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/RegistryCalls.java
===================================================================
--- modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/RegistryCalls.java	(revision 60923)
+++ modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/utils/RegistryCalls.java	(revision 60924)
@@ -8,10 +8,13 @@
 import org.mitre.openid.connect.model.OIDCAuthenticationToken;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
+import org.springframework.security.access.method.P;
 import org.springframework.security.core.context.SecurityContextHolder;
 import org.springframework.stereotype.Service;
 
+import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 @Service
@@ -70,6 +73,21 @@
         return null;
     }
 
+    public List<Integer> getCoPersonIdsByEmail(String email) {
+        List<Integer> coPersonIds = new ArrayList<>();
+        Map<String, String> params = new HashMap<>();
+        params.put("coid", coid);
+        params.put("mail", email);
+        JsonElement response = httpUtils.get("co_people.json", params);
+        if(response != null) {
+            JsonArray coPeople = response.getAsJsonObject().get("CoPeople").getAsJsonArray();
+            for(int i = 0; i < coPeople.size(); i++) {
+                coPersonIds.add(coPeople.get(i).getAsJsonObject().get("Id").getAsInt());
+            }
+        }
+        return coPersonIds;
+    }
+
     /**
      * 2. Get CoPersonId by AAI identifier
      */
@@ -255,9 +273,18 @@
         JsonArray emails = new JsonArray();
         infos.forEach(info -> {
             JsonObject user = new JsonObject();
-            user.addProperty("email", info.getAsJsonObject().get("Mail").getAsString());
-            user.addProperty("memberSince", info.getAsJsonObject().get("Created").getAsString());
-            emails.add(user);
+            boolean add = true;
+            String email = info.getAsJsonObject().get("Mail").getAsString();
+            for(JsonElement element : emails) {
+                if(element.getAsJsonObject().get("email").getAsString().equals(email)) {
+                    add = false;
+                }
+            }
+            if(add) {
+                user.addProperty("email", email);
+                user.addProperty("memberSince", info.getAsJsonObject().get("Created").getAsString());
+                emails.add(user);
+            }
         });
         return emails;
     }
@@ -284,8 +311,29 @@
     }
 
     /**
-     * 14. Assign a member role to a User
+     * 14. Get Users' identifiers of a Cou
      */
+    public JsonArray getUserIdByCouId(Integer couId, boolean admin) {
+        Map<String, String> params = new HashMap<>();
+        params.put("couid", couId.toString());
+        if (admin) {
+            params.put("admin", "true");
+        }
+        JsonElement response = httpUtils.get("identifiers.json", params);
+        JsonArray infos = (response != null) ? response.getAsJsonObject().get("Identifiers").getAsJsonArray() : new JsonArray();
+        JsonArray emails = new JsonArray();
+        infos.forEach(info -> {
+            JsonObject user = new JsonObject();
+            user.addProperty("id", info.getAsJsonObject().get("Identifier").getAsString());
+            user.addProperty("memberSince", info.getAsJsonObject().get("Created").getAsString());
+            emails.add(user);
+        });
+        return emails;
+    }
+
+    /**
+     * 15. Assign a member role to a User
+     */
     public void assignMemberRole(Integer coPersonId, Integer couId, Integer id) {
         if (id != null) {
             httpUtils.put("co_person_roles/" + id.toString() + ".json", jsonUtils.coPersonRoles(coPersonId, couId, "Active"));
@@ -295,14 +343,16 @@
     }
 
     /**
-     * 15. Remove a member role from a User
+     * 16. Remove a member role from a User
      */
     public void removeMemberRole(Integer coPersonId, Integer couId, Integer id) {
-        httpUtils.put("co_person_roles/" + id.toString() + ".json", jsonUtils.coPersonRoles(coPersonId, couId, "Deleted"));
+        if(id != null) {
+            httpUtils.put("co_person_roles/" + id.toString() + ".json", jsonUtils.coPersonRoles(coPersonId, couId, "Deleted"));
+        }
     }
 
     /**
-     * 16. Create a new role
+     * 17. Create a new role
      */
     public void createRole(Role role) {
         httpUtils.post("cous.json", jsonUtils.createNewCou(role));
@@ -309,7 +359,7 @@
     }
 
     /**
-     * 17. Get User's email
+     * 18. Get User's email
      */
     public String getUserEmail(Integer coPersonId) {
         Map<String, String> params = new HashMap<>();
@@ -320,7 +370,7 @@
     }
 
     /**
-     * 18. Get User's names
+     * 19. Get User's names
      */
     public String getUserNames(Integer coPersonId) {
         Map<String, String> params = new HashMap<>();
@@ -331,8 +381,19 @@
     }
 
     /**
-     * 14. Assign an admin role to a User
+     * 20. Get User's identifier
      */
+    public String getUserId(Integer coPersonId) {
+        Map<String, String> params = new HashMap<>();
+        params.put("copersonid", coPersonId.toString());
+        JsonElement response = httpUtils.get("identifiers.json", params);
+        JsonObject info = (response != null) ? response.getAsJsonObject().get("Identifiers").getAsJsonArray().get(0).getAsJsonObject() : null;
+        return (info != null) ? info.getAsJsonObject().get("Identifier").getAsString() : null;
+    }
+
+    /**
+     * 21. Assign an admin role to a User
+     */
     public void assignAdminRole(Integer coPersonId, Integer couId) {
         JsonObject group = getCouAdminGroup(couId);
         if (group != null) {
@@ -341,7 +402,7 @@
     }
 
     /**
-     * 15. Remove an admin role from a User
+     * 22. Remove an admin role from a User
      */
     public void removeAdminRole(Integer coPersonId, Integer couId) {
         JsonObject adminGroup = this.getCouAdminGroup(couId);
Index: modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServlet.java
===================================================================
--- modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServlet.java	(revision 60923)
+++ modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/RegisterServlet.java	(revision 60924)
@@ -50,7 +50,7 @@
 
     private static Logger logger = Logger.getLogger(RegisterServlet.class);
 
-        @Override
+    @Override
     protected void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException {
         response.setContentType("text/html");
         PrintWriter printWriter = response.getWriter();
Index: modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/api/RegistryService.java
===================================================================
--- modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/api/RegistryService.java	(revision 60923)
+++ modules/dnet-openaire-users/branches/prod/src/main/java/eu/dnetlib/openaire/usermanagement/api/RegistryService.java	(revision 60924)
@@ -15,6 +15,7 @@
 import org.mitre.openid.connect.model.OIDCAuthenticationToken;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
+import org.springframework.security.access.method.P;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.security.core.authority.SimpleGrantedAuthority;
 import org.springframework.security.core.context.SecurityContextHolder;
@@ -27,6 +28,7 @@
 import javax.ws.rs.core.Response;
 import java.util.Collection;
 import java.util.HashSet;
+import java.util.List;
 
 @Component(value = "RegistryService")
 @Path("/registry")
@@ -52,11 +54,6 @@
     @Autowired
     private AuthorizationService authorizationService;
 
-    private String sendEmail() {
-        OIDCAuthenticationToken authenticationToken = (OIDCAuthenticationToken) SecurityContextHolder.getContext().getAuthentication();
-        return authenticationToken.getUserInfo().getEmail();
-    }
-
     /**
      * Subscribe to a type(Community, etc.) with id(ee, egi, etc.)
      */
@@ -70,7 +67,7 @@
         if (couId != null) {
             Integer role = calls.getRoleId(coPersonId, couId);
             calls.assignMemberRole(coPersonId, couId, role);
-            authoritiesUpdater.update(sendEmail(), old -> {
+            authoritiesUpdater.update(authorizationService.getEmail(), old -> {
                 HashSet<SimpleGrantedAuthority> authorities = new HashSet<>((Collection<? extends SimpleGrantedAuthority>) old);
                 authorities.add(new SimpleGrantedAuthority(authorizationService.member(type, id)));
                 return authorities;
@@ -97,7 +94,7 @@
             if (role != null) {
                 calls.removeAdminRole(coPersonId, couId);
                 calls.removeMemberRole(coPersonId, couId, role);
-                authoritiesUpdater.update(sendEmail(), old -> {
+                authoritiesUpdater.update(authorizationService.getEmail(), old -> {
                     HashSet<SimpleGrantedAuthority> authorities = new HashSet<>((Collection<? extends SimpleGrantedAuthority>) old);
                     authorities.remove(new SimpleGrantedAuthority(authorizationService.manager(type, id)));
                     authorities.remove(new SimpleGrantedAuthority(authorizationService.member(type, id)));
@@ -120,9 +117,9 @@
     @Consumes(MediaType.APPLICATION_JSON)
     @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN)")
     public Response createRole(@RequestBody Role role) {
-        if(calls.getCouId(role.getName()) == null) {
-        calls.createRole(role);
-        return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse("Role has been created").toString()).type(MediaType.APPLICATION_JSON).build();
+        if (calls.getCouId(role.getName()) == null) {
+            calls.createRole(role);
+            return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse("Role has been created").toString()).type(MediaType.APPLICATION_JSON).build();
         } else {
             return Response.status(HttpStatus.CONFLICT.value()).entity(jsonUtils.createResponse("Role has already existed").toString()).type(MediaType.APPLICATION_JSON).build();
         }
@@ -129,7 +126,6 @@
     }
 
     /**
-     *
      * Invite user with email to manage a type(Community, etc.) with id(ee, egi, etc.)
      * Auto generated link and code will be sent as response.
      */
@@ -184,7 +180,7 @@
     }
 
     private Response sendEmail(JsonObject details, JsonObject email, Integer coPersonId, JsonObject invitation) {
-        String name = (coPersonId != null)?calls.getUserNames(coPersonId):"User";
+        String name = (coPersonId != null) ? calls.getUserNames(coPersonId) : "User";
         String link = details.get("link").getAsString() + invitation.get("link").getAsString();
         String subject = email.get("subject").getAsString();
         String message = email.get("body").getAsString().
@@ -273,7 +269,7 @@
     public Response getVerification(@PathParam("id") String id) {
         RoleVerification verification = verificationUtils.getVerification(id);
         if (verification != null) {
-            if (calls.getCoPersonIdByEmail(verification.getEmail()).equals(calls.getCoPersonIdByIdentifier())) {
+            if (verification.getEmail().equalsIgnoreCase(authorizationService.getEmail())) {
                 return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(jsonUtils.createVerification(verification)).toString()).type(MediaType.APPLICATION_JSON).build();
             } else {
                 return Response.status(HttpStatus.FORBIDDEN.value()).entity(jsonUtils.createResponse("Forbidden verification").toString()).type(MediaType.APPLICATION_JSON).build();
@@ -310,17 +306,33 @@
     public Response verifyManager(@PathParam("id") String id, @RequestBody String code) {
         RoleVerification verification = verificationUtils.getVerification(id);
         if (verification != null && verification.getVerificationType().equals("manager")) {
-            Integer coPersonId = calls.getCoPersonIdByEmail(verification.getEmail());
+            Integer coPersonId = calls.getCoPersonIdByIdentifier();
             if (coPersonId != null) {
-                if (coPersonId.equals(calls.getCoPersonIdByIdentifier())) {
+                if (verification.getEmail().equalsIgnoreCase(authorizationService.getEmail())) {
                     if (verification.getVerificationCode().equals(code)) {
                         Integer couId = calls.getCouId(verification.getType(), verification.getEntity());
                         if (couId != null) {
                             Integer role = calls.getRoleId(coPersonId, couId);
                             calls.assignMemberRole(coPersonId, couId, role);
-                            verificationUtils.deleteMemberVerifications(verification.getEmail(), verification.getType(), verification.getEntity());
+                            if (verification.getType().equals("community") || verification.getType().equals("ri")) {
+                                Integer riCouId = calls.getCouId("ri", verification.getEntity(), false);
+                                if (riCouId != null) {
+                                    calls.assignMemberRole(coPersonId, riCouId, calls.getRoleId(coPersonId, riCouId));
+                                    verificationUtils.deleteMemberVerifications(verification.getEmail(), "community", verification.getEntity());
+                                    verificationUtils.deleteMemberVerifications(verification.getEmail(), "ri", verification.getEntity());
+                                } else {
+                                    verificationUtils.deleteMemberVerifications(verification.getEmail(), "community", verification.getEntity());
+                                }
+                            } else {
+                                verificationUtils.deleteMemberVerifications(verification.getEmail(), verification.getType(), verification.getEntity());
+                            }
                             if (calls.getUserAdminGroup(coPersonId, couId) == null) {
-                                verificationUtils.deleteManagerVerifications(verification.getEmail(), verification.getType(), verification.getEntity());
+                                if (verification.getType().equals("community") || verification.getType().equals("ri")) {
+                                    verificationUtils.deleteManagerVerifications(verification.getEmail(), "community", verification.getEntity());
+                                    verificationUtils.deleteManagerVerifications(verification.getEmail(), "ri", verification.getEntity());
+                                } else {
+                                    verificationUtils.deleteManagerVerifications(verification.getEmail(), verification.getType(), verification.getEntity());
+                                }
                                 calls.assignAdminRole(coPersonId, couId);
                                 authoritiesUpdater.update(verification.getEmail(), old -> {
                                     HashSet<SimpleGrantedAuthority> authorities = new HashSet<>((Collection<? extends SimpleGrantedAuthority>) old);
@@ -336,7 +348,7 @@
                             return Response.status(HttpStatus.NOT_FOUND.value()).entity(jsonUtils.createResponse("Role has not been found").toString()).type(MediaType.APPLICATION_JSON).build();
                         }
                     } else {
-                        return Response.status(HttpStatus.FORBIDDEN.value()).entity(jsonUtils.createResponse("Verification code is wrong").toString()).type(MediaType.APPLICATION_JSON).build();
+                        return Response.status(HttpStatus.BAD_REQUEST.value()).entity(jsonUtils.createResponse("Verification code is wrong").toString()).type(MediaType.APPLICATION_JSON).build();
                     }
                 } else {
                     return Response.status(HttpStatus.FORBIDDEN.value()).entity(jsonUtils.createResponse("Forbidden verification").toString()).type(MediaType.APPLICATION_JSON).build();
@@ -360,9 +372,9 @@
     public Response verifyMember(@PathParam("id") String id, @RequestBody String code) {
         RoleVerification verification = verificationUtils.getVerification(id);
         if (verification != null && verification.getVerificationType().equals("member")) {
-            Integer coPersonId = calls.getCoPersonIdByEmail(verification.getEmail());
+            Integer coPersonId = calls.getCoPersonIdByIdentifier();
             if (coPersonId != null) {
-                if (coPersonId.equals(calls.getCoPersonIdByIdentifier())) {
+                if (verification.getEmail().equalsIgnoreCase(authorizationService.getEmail())) {
                     if (verification.getVerificationCode().equals(code)) {
                         Integer couId = calls.getCouId(verification.getType(), verification.getEntity(), false);
                         if (couId != null) {
@@ -402,11 +414,13 @@
     @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN, @AuthorizationService.curator(#type), @AuthorizationService.manager(#type, #id))")
     public Response removeManagerRole(@PathParam("type") String type, @PathParam("id") String
             id, @PathParam("email") String email) {
-        Integer coPersonId = calls.getCoPersonIdByEmail(email);
-        if (coPersonId != null) {
+        List<Integer> coPersonIds = calls.getCoPersonIdsByEmail(email);
+        if (coPersonIds.size() > 0) {
             Integer couId = calls.getCouId(type, id);
             if (couId != null) {
-                calls.removeAdminRole(coPersonId, couId);
+                coPersonIds.forEach(coPersonId -> {
+                    calls.removeAdminRole(coPersonId, couId);
+                });
                 authoritiesUpdater.update(email, old -> {
                     HashSet<SimpleGrantedAuthority> authorities = new HashSet<>((Collection<? extends SimpleGrantedAuthority>) old);
                     authorities.remove(new SimpleGrantedAuthority(authorizationService.manager(type, id)));
@@ -431,16 +445,15 @@
     @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN, @AuthorizationService.curator(#type), @AuthorizationService.manager(#type, #id))")
     public Response removeMemberRole(@PathParam("type") String type, @PathParam("id") String
             id, @PathParam("email") String email) {
-        Integer coPersonId = calls.getCoPersonIdByEmail(email);
-        if (coPersonId != null) {
+        List<Integer> coPersonIds = calls.getCoPersonIdsByEmail(email);
+        if (coPersonIds.size() > 0) {
             Integer couId = calls.getCouId(type, id, false);
-            Integer role = null;
-            if(couId != null) {
-                role = calls.getRoleId(coPersonId, couId);
-            }
-            if (couId != null && role != null) {
-                calls.removeAdminRole(coPersonId, couId);
-                calls.removeMemberRole(coPersonId, couId, role);
+            if (couId != null) {
+                coPersonIds.forEach(coPersonId -> {
+                    Integer role = calls.getRoleId(coPersonId, couId);
+                    calls.removeAdminRole(coPersonId, couId);
+                    calls.removeMemberRole(coPersonId, couId, role);
+                });
                 authoritiesUpdater.update(email, old -> {
                     HashSet<SimpleGrantedAuthority> authorities = new HashSet<>((Collection<? extends SimpleGrantedAuthority>) old);
                     authorities.remove(new SimpleGrantedAuthority(authorizationService.manager(type, id)));
@@ -465,8 +478,8 @@
     @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN," +
             "@AuthorizationService.curator(#type), @AuthorizationService.manager(#type, #id))")
     public Response getMembers(@PathParam("type") String type, @PathParam("id") String id) {
-        Integer couId = calls.getCouId(type, id,false);
-        if(couId != null) {
+        Integer couId = calls.getCouId(type, id, false);
+        if (couId != null) {
             JsonArray members = calls.getUserNamesByCouId(couId, false);
             return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(members).toString()).type(MediaType.APPLICATION_JSON).build();
         } else {
@@ -484,7 +497,7 @@
             "@AuthorizationService.curator(#type), @AuthorizationService.manager(#type, #id))")
     public Response getMembersEmail(@PathParam("type") String type, @PathParam("id") String id) {
         Integer couId = calls.getCouId(type, id, false);
-        if(couId != null) {
+        if (couId != null) {
             JsonArray members = calls.getUserEmailByCouId(couId, false);
             return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(members).toString()).type(MediaType.APPLICATION_JSON).build();
         } else {
@@ -493,6 +506,24 @@
     }
 
     /**
+     * Get the Identifiers of the members of a type(Community, etc.) with id(ee, egi, etc.)
+     */
+    @Path("/{type}/{id}/members/id")
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    @PreAuthorize("hasAnyAuthority(@AuthorizationService.PORTAL_ADMIN," +
+            "@AuthorizationService.curator(#type), @AuthorizationService.manager(#type, #id))")
+    public Response getMembersId(@PathParam("type") String type, @PathParam("id") String id) {
+        Integer couId = calls.getCouId(type, id, false);
+        if (couId != null) {
+            JsonArray members = calls.getUserIdByCouId(couId, false);
+            return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(members).toString()).type(MediaType.APPLICATION_JSON).build();
+        } else {
+            return Response.status(HttpStatus.NOT_FOUND.value()).entity(jsonUtils.createResponse("Role has not been found").toString()).type(MediaType.APPLICATION_JSON).build();
+        }
+    }
+
+    /**
      * Get the number of the members of a type(Community, etc.) with id(ee, egi, etc.)
      */
     @Path("/{type}/{id}/members/count")
@@ -501,7 +532,7 @@
     public Response getMembersCount(@PathParam("type") String type, @PathParam("id") String id) {
         Integer couId = calls.getCouId(type, id, false);
         int count = 0;
-        if(couId != null) {
+        if (couId != null) {
             count = calls.getUserNamesByCouId(couId, false).size();
         }
         return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(count).toString()).type(MediaType.APPLICATION_JSON).build();
@@ -515,7 +546,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response getManagers(@PathParam("type") String type, @PathParam("id") String id) {
         Integer couId = calls.getCouId(type, id);
-        if(couId != null) {
+        if (couId != null) {
             JsonArray managers = calls.getUserNamesByCouId(couId, true);
             return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(managers).toString()).type(MediaType.APPLICATION_JSON).build();
         } else {
@@ -531,7 +562,7 @@
     @Produces(MediaType.APPLICATION_JSON)
     public Response getManagersEmail(@PathParam("type") String type, @PathParam("id") String id) {
         Integer couId = calls.getCouId(type, id);
-        if(couId != null) {
+        if (couId != null) {
             JsonArray managers = calls.getUserEmailByCouId(couId, true);
             return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(managers).toString()).type(MediaType.APPLICATION_JSON).build();
         } else {
@@ -538,4 +569,20 @@
             return Response.status(HttpStatus.NOT_FOUND.value()).entity(jsonUtils.createResponse("Role has not been found").toString()).type(MediaType.APPLICATION_JSON).build();
         }
     }
+
+    /**
+     * Get the Identifiers of the managers of a type(Community, etc.) with id(ee, egi, etc.)
+     */
+    @Path("/{type}/{id}/managers/id")
+    @GET
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response getManagersId(@PathParam("type") String type, @PathParam("id") String id) {
+        Integer couId = calls.getCouId(type, id);
+        if (couId != null) {
+            JsonArray managers = calls.getUserIdByCouId(couId, true);
+            return Response.status(HttpStatus.OK.value()).entity(jsonUtils.createResponse(managers).toString()).type(MediaType.APPLICATION_JSON).build();
+        } else {
+            return Response.status(HttpStatus.NOT_FOUND.value()).entity(jsonUtils.createResponse("Role has not been found").toString()).type(MediaType.APPLICATION_JSON).build();
+        }
+    }
 }
