Skip to content

Commit

Permalink
Merge pull request #77 from SAG-iBit/bugfix/team-urlencode
Browse files Browse the repository at this point in the history
Teams with special symbols are not synced by AAD
  • Loading branch information
Jared Murrell authored Apr 12, 2021
2 parents 6b8f735 + 9d19cad commit 5f6515f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions githubapp/azuread.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def get_group_members(self, token=None, group_name=None):
token = self.get_access_token() if not token else token
member_list = []
# Calling graph using the access token
# 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}')",
headers={"Authorization": f"Bearer {token}"},
Expand Down

0 comments on commit 5f6515f

Please sign in to comment.