Skip to content

Commit

Permalink
Adlsgen2 fixes (#1974)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
john-carroll-sw authored Sep 18, 2024
1 parent cc74772 commit 8f3abc4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion scripts/adlsgen2setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +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,
"groupTypes": ["Unified"],
"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()
Expand Down
2 changes: 1 addition & 1 deletion scripts/adlsgen2setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f3abc4

Please sign in to comment.