From e1fdc9b33694f34b92d9deaf71df32f86196c921 Mon Sep 17 00:00:00 2001 From: John Carroll <13478618+john-carroll-sw@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:44:07 +0000 Subject: [PATCH 1/3] Modified create_or_get_group Function. Added the mailEnabled and mailNickname properties. --- scripts/adlsgen2setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/adlsgen2setup.py b/scripts/adlsgen2setup.py index 02cf860a85..3e64269c6c 100644 --- a/scripts/adlsgen2setup.py +++ b/scripts/adlsgen2setup.py @@ -135,7 +135,8 @@ async def create_or_get_group(self, group_name: str): logging.info(f"Could not find group {group_name}, creating...") group = { "displayName": group_name, - "groupTypes": ["Unified"], + "mailEnabled": False, # Set mailEnabled to False + "mailNickname": group_name, "securityEnabled": self.security_enabled_groups, } async with session.post("https://graph.microsoft.com/v1.0/groups", json=group) as response: From d7a93c6bebd88a1119dbd72ec7e6f0abdeeca2f9 Mon Sep 17 00:00:00 2001 From: John Carroll <13478618+john-carroll-sw@users.noreply.github.com> Date: Mon, 16 Sep 2024 16:45:30 +0000 Subject: [PATCH 2/3] Changed the conditional check in the adlsgen2setup.sh script. The change from -n to -z ensures that the script correctly verifies whether the AZURE_ADLS_GEN2_STORAGE_ACCOUNT environment variable is set and non-empty before proceeding. This is the intended behavior to avoid running the script without the necessary configuration. --- scripts/adlsgen2setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/adlsgen2setup.sh b/scripts/adlsgen2setup.sh index 6118a5e8e6..119379212c 100755 --- a/scripts/adlsgen2setup.sh +++ b/scripts/adlsgen2setup.sh @@ -2,7 +2,7 @@ . ./scripts/loadenv.sh -if [ -n "$AZURE_ADLS_GEN2_STORAGE_ACCOUNT" ]; then +if [ -z "$AZURE_ADLS_GEN2_STORAGE_ACCOUNT" ]; then echo 'AZURE_ADLS_GEN2_STORAGE_ACCOUNT must be set to continue' exit 1 fi From 86c592ed9d110fbfaebe9d438492474e91c603f4 Mon Sep 17 00:00:00 2001 From: John Carroll <13478618+john-carroll-sw@users.noreply.github.com> Date: Tue, 17 Sep 2024 02:18:09 +0000 Subject: [PATCH 3/3] Added a comment to inform the developer to resolve a potential AAD tenant issue in adlsgen2setup.py --- scripts/adlsgen2setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/adlsgen2setup.py b/scripts/adlsgen2setup.py index 3e64269c6c..98fd265c6f 100644 --- a/scripts/adlsgen2setup.py +++ b/scripts/adlsgen2setup.py @@ -135,9 +135,11 @@ async def create_or_get_group(self, group_name: str): logging.info(f"Could not find group {group_name}, creating...") group = { "displayName": group_name, - "mailEnabled": False, # Set mailEnabled to False - "mailNickname": group_name, "securityEnabled": self.security_enabled_groups, + "groupTypes": ["Unified"], + # If Unified does not work for you, then you may need the following settings instead: + # "mailEnabled": False, + # "mailNickname": group_name, } async with session.post("https://graph.microsoft.com/v1.0/groups", json=group) as response: content = await response.json()