Skip to content

Commit

Permalink
Add advanced query filter to get the existing user by list (#1287)
Browse files Browse the repository at this point in the history
Co-authored-by: neil-yechenwei <[email protected]>
  • Loading branch information
neil-yechenwei and neil-yechenwei authored Oct 16, 2023
1 parent 7d82076 commit 0449baf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions plugins/modules/azure_rm_aduser.py
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,12 @@ async def get_users_by_filter(self, filter):
return await self._client.users.get(request_configuration = UsersRequestBuilder.UsersRequestBuilderGetRequestConfiguration(
query_parameters = UsersRequestBuilder.UsersRequestBuilderGetQueryParameters(
filter = filter,
select = ["accountEnabled", "displayName", "mail", "mailNickname", "id", "userPrincipalName", "userType", "onPremisesImmutableId", "usageLocation", "givenName", "surname"]
)
select = ["accountEnabled", "displayName", "mail", "mailNickname", "id", "userPrincipalName", "userType", "onPremisesImmutableId", "usageLocation", "givenName", "surname"],
count = True
),
headers = {
'ConsistencyLevel' : "eventual",
}
)
)

Expand Down
6 changes: 5 additions & 1 deletion plugins/modules/azure_rm_aduser_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,12 @@ async def get_users_by_filter(self, filter):
return await self._client.users.get(request_configuration = UsersRequestBuilder.UsersRequestBuilderGetRequestConfiguration(
query_parameters = UsersRequestBuilder.UsersRequestBuilderGetQueryParameters(
filter = filter,
select = ["accountEnabled", "displayName", "mail", "mailNickname", "id", "userPrincipalName", "userType"]
select = ["accountEnabled", "displayName", "mail", "mailNickname", "id", "userPrincipalName", "userType"],
count = True
),
headers = {
'ConsistencyLevel' : "eventual",
}
)
)

Expand Down

0 comments on commit 0449baf

Please sign in to comment.