Skip to content

Commit 8f3abc4

Browse files
Adlsgen2 fixes (#1974)
* Modified create_or_get_group Function. Added the mailEnabled and mailNickname properties. * 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. * Added a comment to inform the developer to resolve a potential AAD tenant issue in adlsgen2setup.py
1 parent cc74772 commit 8f3abc4

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

scripts/adlsgen2setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,11 @@ async def create_or_get_group(self, group_name: str):
135135
logging.info(f"Could not find group {group_name}, creating...")
136136
group = {
137137
"displayName": group_name,
138-
"groupTypes": ["Unified"],
139138
"securityEnabled": self.security_enabled_groups,
139+
"groupTypes": ["Unified"],
140+
# If Unified does not work for you, then you may need the following settings instead:
141+
# "mailEnabled": False,
142+
# "mailNickname": group_name,
140143
}
141144
async with session.post("https://graph.microsoft.com/v1.0/groups", json=group) as response:
142145
content = await response.json()

scripts/adlsgen2setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
. ./scripts/loadenv.sh
44

5-
if [ -n "$AZURE_ADLS_GEN2_STORAGE_ACCOUNT" ]; then
5+
if [ -z "$AZURE_ADLS_GEN2_STORAGE_ACCOUNT" ]; then
66
echo 'AZURE_ADLS_GEN2_STORAGE_ACCOUNT must be set to continue'
77
exit 1
88
fi

0 commit comments

Comments
 (0)