Class GrouperAzureApiCommands
java.lang.Object
edu.internet2.middleware.grouper.app.azure.GrouperAzureApiCommands
This class interacts with the Microsoft Graph API.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static Map<GrouperAzureGroup,
Exception> createAzureGroups
(String configId, Map<GrouperAzureGroup, Set<String>> groupToFieldNamesToInsert) create groupscreateAzureMemberships
(String configId, String groupId, Collection<String> userIds) create a membershipstatic Map<GrouperAzureUser,
Exception> createAzureUsers
(String configId, List<GrouperAzureUser> grouperAzureUsers, Set<String> fieldsToCreate) create usersstatic Map<GrouperAzureGroup,
Exception> deleteAzureGroups
(String configId, List<GrouperAzureGroup> grouperAzureGroups) static Map<ProvisioningMembership,
Exception> deleteAzureMemberships
(String configId, List<ProvisioningMembership> membershipsToDelete) delete membershipsstatic Map<GrouperAzureUser,
Exception> deleteAzureUsers
(String configId, List<GrouperAzureUser> grouperAzureUsers) static void
static void
retrieveAzureGroupMembers
(String configId, String groupId) return user ids in the groupstatic List<GrouperAzureGroup>
retrieveAzureGroups
(String configId, boolean lookupOwners) static List<GrouperAzureGroup>
retrieveAzureGroups
(String configId, List<String> fieldValues, String fieldName, boolean lookupOwners) retrieveAzureUserGroups
(String configId, String userId) return user ids in the groupstatic List<GrouperAzureUser>
retrieveAzureUsers
(String configId) static List<GrouperAzureUser>
retrieveAzureUsers
(String configId, List<String> fieldValues, String fieldName) static Map<GrouperAzureGroup,
Exception> updateAzureGroups
(String configId, Map<GrouperAzureGroup, Set<String>> azureGroupToFieldNamesToUpdate) update groupsstatic Map<GrouperAzureUser,
Exception> updateAzureUsers
(String configId, Map<GrouperAzureUser, Set<String>> azureUserToFieldNamesToUpdate) update users
-
Constructor Details
-
GrouperAzureApiCommands
public GrouperAzureApiCommands()
-
-
Method Details
-
main
-
createAzureGroups
public static Map<GrouperAzureGroup,Exception> createAzureGroups(String configId, Map<GrouperAzureGroup, Set<String>> groupToFieldNamesToInsert) create groups- Returns:
- the result
-
createAzureUsers
public static Map<GrouperAzureUser,Exception> createAzureUsers(String configId, List<GrouperAzureUser> grouperAzureUsers, Set<String> fieldsToCreate) create users- Parameters:
configId
-grouperAzureUser
-- Returns:
-
createAzureMemberships
public static Map<MultiKey,Exception> createAzureMemberships(String configId, String groupId, Collection<String> userIds) create a membership- Parameters:
grouperAzureGroup
-- Returns:
- the result
-
updateAzureGroups
public static Map<GrouperAzureGroup,Exception> updateAzureGroups(String configId, Map<GrouperAzureGroup, Set<String>> azureGroupToFieldNamesToUpdate) update groups- Parameters:
configId
-azureGroupToFieldNamesToUpdate
-- Returns:
- the result
-
updateAzureUsers
public static Map<GrouperAzureUser,Exception> updateAzureUsers(String configId, Map<GrouperAzureUser, Set<String>> azureUserToFieldNamesToUpdate) update users- Parameters:
configId
-azureUserToFieldNamesToUpdate
-- Returns:
- the result
-
deleteAzureGroups
public static Map<GrouperAzureGroup,Exception> deleteAzureGroups(String configId, List<GrouperAzureGroup> grouperAzureGroups) -
retrieveAzureGroups
-
retrieveAzureUsers
-
retrieveAzureUsers
public static List<GrouperAzureUser> retrieveAzureUsers(String configId, List<String> fieldValues, String fieldName) - Parameters:
configId
-fieldValues
-fieldName
- id or userPrincipalName- Returns:
-
retrieveAzureUserGroups
return user ids in the group- Parameters:
configId
-userId
-- Returns:
- group ids
-
retrieveAzureGroupMembers
return user ids in the group- Parameters:
configId
-groupId
-- Returns:
- user ids
-
retrieveAzureGroups
public static List<GrouperAzureGroup> retrieveAzureGroups(String configId, List<String> fieldValues, String fieldName, boolean lookupOwners) - Parameters:
configId
-- Returns:
-
deleteAzureMemberships
public static Map<ProvisioningMembership,Exception> deleteAzureMemberships(String configId, List<ProvisioningMembership> membershipsToDelete) delete memberships -
deleteAzureUsers
public static Map<GrouperAzureUser,Exception> deleteAzureUsers(String configId, List<GrouperAzureUser> grouperAzureUsers) -
addOwnersToGroup
-
removeOwnersFromGroup
-