Package com.atlassian.crowd.directory
Class AzureAdDirectory
java.lang.Object
com.atlassian.crowd.directory.AzureAdDirectory
- All Implemented Interfaces:
RemoteDirectory,com.atlassian.crowd.embedded.api.Attributes
Microsoft Entra ID connector
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAzureAdDirectory(AzureAdRestClientFactory restClientFactory, MicrosoftGraphQueryTranslator graphQueryTranslator, AzureAdRestEntityMapper restEntityMapper, UserCredentialVerifierFactory credentialVerifierFactory, AzureApiUriResolverFactory endpointDataProviderFactory, com.atlassian.crowd.embedded.spi.DcLicenseChecker dcLicenseChecker) -
Method Summary
Modifier and TypeMethodDescriptionaddGroup(GroupTemplate group) voidaddGroupToGroup(String childGroup, String parentGroup) addUser(UserTemplate user, com.atlassian.crowd.embedded.api.PasswordCredential credential) addUser(UserTemplateWithAttributes user, com.atlassian.crowd.embedded.api.PasswordCredential credential) voidaddUserToGroup(String username, String groupName) authenticate(String name, com.atlassian.crowd.embedded.api.PasswordCredential credential) countDirectMembersOfGroup(String groupName, int querySizeHint) voidfetchGroupChanges(String syncToken) fetchUserChanges(String syncToken) findGroupByName(String name) findUserByExternalId(String externalId) findUserByName(String name) Returns name of the attribute that user name should be mapped to for external users.longgetKeys()getUserAvatarByName(String username, int sizeHint) booleanisEmpty()booleanisGroupDirectGroupMember(String childGroup, String parentGroup) booleanbooleanbooleanbooleanisUserDirectGroupMember(String username, String groupName) voidremoveGroup(String name) voidremoveGroupAttributes(String groupName, String attributeName) voidremoveGroupFromGroup(String childGroup, String parentGroup) voidremoveUser(String name) voidremoveUserAttributes(String username, String attributeName) voidremoveUserFromGroup(String username, String groupName) renameGroup(String oldName, String newName) renameUser(String oldName, String newName) <T> List<T>searchGroupRelationships(MembershipQuery<T> query) <T> List<T>searchGroups(EntityQuery<T> query) <T> List<T>searchUsers(EntityQuery<T> query) voidsetAttributes(Map<String, String> attributes) voidsetDirectoryId(long directoryId) voidvoidbooleanbooleanbooleanbooleanbooleanvoidupdateGroup(GroupTemplate group) updateUser(UserTemplate user) voidupdateUserCredential(String username, com.atlassian.crowd.embedded.api.PasswordCredential credential) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.crowd.directory.RemoteDirectory
updateUserFromRemoteDirectory, userAuthenticated
-
Field Details
-
WEBAPP_CLIENT_ID_ATTRIBUTE
- See Also:
-
WEBAPP_CLIENT_SECRET_ATTRIBUTE
- See Also:
-
TENANT_ID_ATTRIBUTE
- See Also:
-
NATIVE_APP_ID_ATTRIBUTE
- See Also:
-
GRAPH_API_ENDPOINT_ATTRIBUTE
- See Also:
-
AUTHORITY_API_ENDPOINT_ATTRIBUTE
- See Also:
-
REGION_ATTRIBUTE
- See Also:
-
CUSTOM_REGION_ATTRIBUTE_VALUE
- See Also:
-
FILTERED_GROUPS_ATTRIBUTE
- See Also:
-
GROUP_FILTERING_ENABLED_ATTRIBUTE
- See Also:
-
NOT_IMPLEMENTED
- See Also:
-
ALTERNATIVE_USERNAME_ATTRIBUTE
- See Also:
-
MAX_RESTRICTIONS_PER_QUERY
public static final int MAX_RESTRICTIONS_PER_QUERY- See Also:
-
-
Constructor Details
-
AzureAdDirectory
public AzureAdDirectory(AzureAdRestClientFactory restClientFactory, MicrosoftGraphQueryTranslator graphQueryTranslator, AzureAdRestEntityMapper restEntityMapper, UserCredentialVerifierFactory credentialVerifierFactory, AzureApiUriResolverFactory endpointDataProviderFactory, com.atlassian.crowd.embedded.spi.DcLicenseChecker dcLicenseChecker)
-
-
Method Details
-
getValues
- Specified by:
getValuesin interfacecom.atlassian.crowd.embedded.api.Attributes
-
getValue
- Specified by:
getValuein interfacecom.atlassian.crowd.embedded.api.Attributes
-
getKeys
- Specified by:
getKeysin interfacecom.atlassian.crowd.embedded.api.Attributes
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacecom.atlassian.crowd.embedded.api.Attributes
-
getDirectoryId
public long getDirectoryId()- Specified by:
getDirectoryIdin interfaceRemoteDirectory
-
setDirectoryId
public void setDirectoryId(long directoryId) - Specified by:
setDirectoryIdin interfaceRemoteDirectory
-
getDescriptiveName
- Specified by:
getDescriptiveNamein interfaceRemoteDirectory
-
setAttributes
- Specified by:
setAttributesin interfaceRemoteDirectory
-
findUserByName
@Nonnull public User findUserByName(String name) throws UserNotFoundException, OperationFailedException - Specified by:
findUserByNamein interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
findUserWithAttributesByName
@Nonnull public UserWithAttributes findUserWithAttributesByName(String name) throws UserNotFoundException, OperationFailedException - Specified by:
findUserWithAttributesByNamein interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
findUserByExternalId
@Nonnull public User findUserByExternalId(String externalId) throws UserNotFoundException, OperationFailedException - Specified by:
findUserByExternalIdin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
authenticate
@Nonnull public User authenticate(String name, com.atlassian.crowd.embedded.api.PasswordCredential credential) throws UserNotFoundException, InactiveAccountException, InvalidAuthenticationException, ExpiredCredentialException, OperationFailedException - Specified by:
authenticatein interfaceRemoteDirectory- Throws:
UserNotFoundExceptionInactiveAccountExceptionInvalidAuthenticationExceptionExpiredCredentialExceptionOperationFailedException
-
addUser
@Nonnull public User addUser(UserTemplate user, com.atlassian.crowd.embedded.api.PasswordCredential credential) throws InvalidUserException, InvalidCredentialException, UserAlreadyExistsException, OperationFailedException - Specified by:
addUserin interfaceRemoteDirectory- Throws:
InvalidUserExceptionInvalidCredentialExceptionUserAlreadyExistsExceptionOperationFailedException
-
addUser
public UserWithAttributes addUser(UserTemplateWithAttributes user, com.atlassian.crowd.embedded.api.PasswordCredential credential) throws InvalidUserException, InvalidCredentialException, UserAlreadyExistsException, OperationFailedException - Specified by:
addUserin interfaceRemoteDirectory- Throws:
InvalidUserExceptionInvalidCredentialExceptionUserAlreadyExistsExceptionOperationFailedException
-
updateUser
@Nonnull public User updateUser(UserTemplate user) throws InvalidUserException, UserNotFoundException, OperationFailedException - Specified by:
updateUserin interfaceRemoteDirectory- Throws:
InvalidUserExceptionUserNotFoundExceptionOperationFailedException
-
updateUserCredential
public void updateUserCredential(String username, com.atlassian.crowd.embedded.api.PasswordCredential credential) throws UserNotFoundException, InvalidCredentialException, OperationFailedException - Specified by:
updateUserCredentialin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionInvalidCredentialExceptionOperationFailedException
-
renameUser
@Nonnull public User renameUser(String oldName, String newName) throws UserNotFoundException, InvalidUserException, UserAlreadyExistsException, OperationFailedException - Specified by:
renameUserin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionInvalidUserExceptionUserAlreadyExistsExceptionOperationFailedException
-
storeUserAttributes
public void storeUserAttributes(String username, Map<String, Set<String>> attributes) throws UserNotFoundException, OperationFailedException- Specified by:
storeUserAttributesin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
removeUserAttributes
public void removeUserAttributes(String username, String attributeName) throws UserNotFoundException, OperationFailedException - Specified by:
removeUserAttributesin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
removeUser
- Specified by:
removeUserin interfaceRemoteDirectory- Throws:
UserNotFoundExceptionOperationFailedException
-
searchUsers
- Specified by:
searchUsersin interfaceRemoteDirectory- Throws:
OperationFailedException
-
findGroupByName
@Nonnull public Group findGroupByName(String name) throws GroupNotFoundException, OperationFailedException - Specified by:
findGroupByNamein interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
findGroupWithAttributesByName
@Nonnull public GroupWithAttributes findGroupWithAttributesByName(String name) throws GroupNotFoundException, OperationFailedException - Specified by:
findGroupWithAttributesByNamein interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
addGroup
@Nonnull public Group addGroup(GroupTemplate group) throws InvalidGroupException, OperationFailedException - Specified by:
addGroupin interfaceRemoteDirectory- Throws:
InvalidGroupExceptionOperationFailedException
-
updateGroup
@Nonnull public Group updateGroup(GroupTemplate group) throws InvalidGroupException, GroupNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
updateGroupin interfaceRemoteDirectory- Throws:
InvalidGroupExceptionGroupNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
renameGroup
@Nonnull public Group renameGroup(String oldName, String newName) throws GroupNotFoundException, InvalidGroupException, OperationFailedException - Specified by:
renameGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionInvalidGroupExceptionOperationFailedException
-
storeGroupAttributes
public void storeGroupAttributes(String groupName, Map<String, Set<String>> attributes) throws GroupNotFoundException, OperationFailedException- Specified by:
storeGroupAttributesin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
removeGroupAttributes
public void removeGroupAttributes(String groupName, String attributeName) throws GroupNotFoundException, OperationFailedException - Specified by:
removeGroupAttributesin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionOperationFailedException
-
removeGroup
public void removeGroup(String name) throws GroupNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
removeGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
searchGroups
- Specified by:
searchGroupsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
isUserDirectGroupMember
public boolean isUserDirectGroupMember(String username, String groupName) throws OperationFailedException - Specified by:
isUserDirectGroupMemberin interfaceRemoteDirectory- Throws:
OperationFailedException
-
isGroupDirectGroupMember
public boolean isGroupDirectGroupMember(String childGroup, String parentGroup) throws OperationFailedException - Specified by:
isGroupDirectGroupMemberin interfaceRemoteDirectory- Throws:
OperationFailedException
-
countDirectMembersOfGroup
@Nonnull public BoundedCount countDirectMembersOfGroup(String groupName, int querySizeHint) throws OperationFailedException - Specified by:
countDirectMembersOfGroupin interfaceRemoteDirectory- Throws:
OperationFailedException
-
addUserToGroup
public void addUserToGroup(String username, String groupName) throws GroupNotFoundException, UserNotFoundException, ReadOnlyGroupException, OperationFailedException, MembershipAlreadyExistsException - Specified by:
addUserToGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionUserNotFoundExceptionReadOnlyGroupExceptionOperationFailedExceptionMembershipAlreadyExistsException
-
addGroupToGroup
public void addGroupToGroup(String childGroup, String parentGroup) throws GroupNotFoundException, InvalidMembershipException, ReadOnlyGroupException, OperationFailedException, MembershipAlreadyExistsException - Specified by:
addGroupToGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionInvalidMembershipExceptionReadOnlyGroupExceptionOperationFailedExceptionMembershipAlreadyExistsException
-
removeUserFromGroup
public void removeUserFromGroup(String username, String groupName) throws GroupNotFoundException, UserNotFoundException, MembershipNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
removeUserFromGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionUserNotFoundExceptionMembershipNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
removeGroupFromGroup
public void removeGroupFromGroup(String childGroup, String parentGroup) throws GroupNotFoundException, InvalidMembershipException, MembershipNotFoundException, ReadOnlyGroupException, OperationFailedException - Specified by:
removeGroupFromGroupin interfaceRemoteDirectory- Throws:
GroupNotFoundExceptionInvalidMembershipExceptionMembershipNotFoundExceptionReadOnlyGroupExceptionOperationFailedException
-
searchGroupRelationships
@Nonnull public <T> List<T> searchGroupRelationships(MembershipQuery<T> query) throws OperationFailedException - Specified by:
searchGroupRelationshipsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
testConnection
- Specified by:
testConnectionin interfaceRemoteDirectory- Throws:
OperationFailedException
-
supportsInactiveAccounts
public boolean supportsInactiveAccounts()- Specified by:
supportsInactiveAccountsin interfaceRemoteDirectory
-
supportsNestedGroups
public boolean supportsNestedGroups()- Specified by:
supportsNestedGroupsin interfaceRemoteDirectory
-
supportsPasswordExpiration
public boolean supportsPasswordExpiration()- Specified by:
supportsPasswordExpirationin interfaceRemoteDirectory
-
supportsSettingEncryptedCredential
public boolean supportsSettingEncryptedCredential()- Specified by:
supportsSettingEncryptedCredentialin interfaceRemoteDirectory
-
isRolesDisabled
public boolean isRolesDisabled()- Specified by:
isRolesDisabledin interfaceRemoteDirectory
-
getMemberships
- Specified by:
getMembershipsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
getAuthoritativeDirectory
- Specified by:
getAuthoritativeDirectoryin interfaceRemoteDirectory
-
expireAllPasswords
- Specified by:
expireAllPasswordsin interfaceRemoteDirectory- Throws:
OperationFailedException
-
getUserAvatarByName
- Specified by:
getUserAvatarByNamein interfaceRemoteDirectory
-
getLocallyFilteredGroupNames
- Specified by:
getLocallyFilteredGroupNamesin interfaceRemoteDirectory
-
isGroupFilteringEnabled
public boolean isGroupFilteringEnabled() -
getGroupsNamesToFilter
-
getFilteredGroups
- Throws:
OperationFailedException
-
performUsersDeltaQuery
public DeltaQueryResult<UserWithAttributes> performUsersDeltaQuery() throws OperationFailedException- Throws:
OperationFailedException
-
performGroupsDeltaQuery
public DeltaQueryResult<GroupWithMembershipChanges> performGroupsDeltaQuery() throws OperationFailedException- Throws:
OperationFailedException
-
fetchGroupChanges
public DeltaQueryResult<GroupWithMembershipChanges> fetchGroupChanges(String syncToken) throws OperationFailedException - Throws:
OperationFailedException
-
fetchUserChanges
public DeltaQueryResult<UserWithAttributes> fetchUserChanges(String syncToken) throws OperationFailedException - Throws:
OperationFailedException
-
supportsDeltaQueryApi
public boolean supportsDeltaQueryApi() -
createMembershipHelper
-
getRestClient
-
getTranslator
-
isLocalGroupsEnabled
public boolean isLocalGroupsEnabled() -
getAlternativeUsernameAttribute
Returns name of the attribute that user name should be mapped to for external users.
-