From 2cfbb643b0ccd1bfb42a427565be81c642ee6878 Mon Sep 17 00:00:00 2001 From: Sushant Pradhan Date: Sat, 22 Jan 2022 22:14:56 -0600 Subject: [PATCH] Fix #109. Use explicit match condition --- githubapp/azuread.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/githubapp/azuread.py b/githubapp/azuread.py index 4f00b70..6b19b89 100644 --- a/githubapp/azuread.py +++ b/githubapp/azuread.py @@ -73,7 +73,7 @@ def get_group_members(self, token=None, group_name=None): # url encode the group name group_name = requests.utils.quote(group_name) graph_data = requests.get( # Use token to call downstream service - f"{self.AZURE_API_ENDPOINT}/groups?$filter=startswith(displayName,'{group_name}')", + f"{self.AZURE_API_ENDPOINT}/groups?$filter=displayName eq '{group_name}'", headers={"Authorization": f"Bearer {token}"}, ).json() # print("Graph API call result: %s" % json.dumps(graph_data, indent=2))