Skip to content

[Storage] az storage account create/update: Support --enable-smb-oauth to allow managed identities to access SMB shares using OAuth#32177

Merged
calvinhzy merged 17 commits intoAzure:devfrom
calvinhzy:storage-account-isSmbOauthEnabled
Sep 26, 2025
Merged

[Storage] az storage account create/update: Support --enable-smb-oauth to allow managed identities to access SMB shares using OAuth#32177
calvinhzy merged 17 commits intoAzure:devfrom
calvinhzy:storage-account-isSmbOauthEnabled

Conversation

@calvinhzy
Copy link
Copy Markdown
Member

@calvinhzy calvinhzy commented Sep 26, 2025

Related command

Description

Supported enabling SMB Oauth on Storage accounts

Testing Guide

History Notes

[Storage] az storage account create/update: Support --enable-smb-oauth to allow managed identities to access SMB shares using OAuth


This checklist is used to make sure that common guidelines for a pull request are followed.

calvinhzy and others added 17 commits September 22, 2025 16:32
…25-01-01

# Conflicts:
#	src/azure-cli/azure/cli/command_modules/marketplaceordering/tests/latest/test_marketplaceordering_scenario_coverage.md
#	src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_customer_managed_key.yaml
#	src/azure-cli/azure/cli/command_modules/storage/tests/latest/recordings/test_storage_account_encryption_scope.yaml
@calvinhzy calvinhzy self-assigned this Sep 26, 2025
@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Sep 26, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.13
️✔️acs
️✔️latest
️✔️3.12
️✔️3.13
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.13
️✔️ams
️✔️latest
️✔️3.12
️✔️3.13
️✔️apim
️✔️latest
️✔️3.12
️✔️3.13
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.13
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️aro
️✔️latest
️✔️3.12
️✔️3.13
️✔️backup
️✔️latest
️✔️3.12
️✔️3.13
️✔️batch
️✔️latest
️✔️3.12
️✔️3.13
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.13
️✔️billing
️✔️latest
️✔️3.12
️✔️3.13
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.13
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.13
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.13
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.13
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.13
️✔️config
️✔️latest
️✔️3.12
️✔️3.13
️✔️configure
️✔️latest
️✔️3.12
️✔️3.13
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.13
️✔️container
️✔️latest
️✔️3.12
️✔️3.13
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.13
️✔️core
️✔️latest
️✔️3.12
️✔️3.13
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.13
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.13
️✔️dls
️✔️latest
️✔️3.12
️✔️3.13
️✔️dms
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.13
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.13
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.13
️✔️find
️✔️latest
️✔️3.12
️✔️3.13
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.13
️✔️identity
️✔️latest
️✔️3.12
️✔️3.13
️✔️iot
️✔️latest
️✔️3.12
️✔️3.13
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.13
️✔️lab
️✔️latest
️✔️3.12
️✔️3.13
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.13
️✔️maps
️✔️latest
️✔️3.12
️✔️3.13
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.13
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.13
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.13
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.13
️✔️network
️✔️latest
️✔️3.12
️✔️3.13
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.13
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.13
️✔️profile
️✔️latest
️✔️3.12
️✔️3.13
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.13
️✔️redis
️✔️latest
️✔️3.12
️✔️3.13
️✔️relay
️✔️latest
️✔️3.12
️✔️3.13
️✔️resource
️✔️latest
️✔️3.12
️✔️3.13
️✔️role
️✔️latest
️✔️3.12
️✔️3.13
️✔️search
️✔️latest
️✔️3.12
️✔️3.13
️✔️security
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.13
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.13
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.13
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.13
️✔️sql
️✔️latest
️✔️3.12
️✔️3.13
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.13
️✔️storage
️✔️latest
️✔️3.12
️✔️3.13
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.13
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.13
️✔️util
️✔️latest
️✔️3.12
️✔️3.13
️✔️vm
️✔️latest
️✔️3.12
️✔️3.13

@azure-client-tools-bot-prd
Copy link
Copy Markdown

Hi @calvinhzy,
Since the current milestone time is less than 7 days, this pr will be reviewed in the next milestone.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Sep 26, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️storage
rule cmd_name rule_message suggest_message
⚠️ 1006 - ParaAdd storage account create cmd storage account create added parameter enable_smb_oauth
⚠️ 1006 - ParaAdd storage account update cmd storage account update added parameter enable_smb_oauth

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Sep 26, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

Copilot AI review requested due to automatic review settings September 26, 2025 05:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the --enable-smb-oauth parameter to both az storage account create and az storage account update commands, allowing users to enable or disable SMB OAuth authentication for Azure Files using managed identities.

Changes Summary

  • Adds new --enable-smb-oauth parameter support to storage account create and update commands
  • Implements the functionality to configure SMB OAuth settings in Azure Files identity-based authentication
  • Includes comprehensive test coverage for the new feature

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
test_storage_account_scenarios.py Adds comprehensive test cases for SMB OAuth functionality across create/update scenarios
test_storage_account_smb_oauth.yaml Recording file capturing HTTP interactions for the new test cases
account.py Implements the core logic to handle enable_smb_oauth parameter in create/update operations
_params.py Defines the new --enable-smb-oauth parameter for both create and update commands
Comments suppressed due to low confidence (1)

src/azure-cli/azure/cli/command_modules/storage/tests/latest/test_storage_account_scenarios.py:1

  • The test creates storage account sasmboauth4 but never uses it in any assertions. This test case appears incomplete and should either include verification checks or be removed.
# --------------------------------------------------------------------------------------------

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@calvinhzy calvinhzy changed the title [Storage] az storage account create/update: Support --enable-smb-oauth [Storage] az storage account create/update: Support --enable-smb-oauth to allow managed identities to access SMB shares using OAuth Sep 26, 2025
@calvinhzy calvinhzy merged commit 8ee23c2 into Azure:dev Sep 26, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Storage az storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants