-
Notifications
You must be signed in to change notification settings - Fork 3.3k
[Storage] az storage blob/container/fs/share/file/queue generate-sas: Support user delegated sas with OAuth
#32508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Storage] az storage blob/container/fs/share/file/queue generate-sas: Support user delegated sas with OAuth
#32508
Conversation
…, update blob, filedatalake, fileshare, queue api versions to v2026-02-06 preview, (in the future can remove multiapi sdk)
️✔️AzureCLI-FullTest
|
|
| rule | cmd_name | rule_message | suggest_message |
|---|---|---|---|
| storage blob generate-sas | cmd storage blob generate-sas added parameter user_delegation_oid |
||
| storage container generate-sas | cmd storage container generate-sas added parameter user_delegation_oid |
||
| storage file generate-sas | cmd storage file generate-sas added parameter as_user |
||
| storage file generate-sas | cmd storage file generate-sas added parameter auth_mode |
||
| storage file generate-sas | cmd storage file generate-sas added parameter enable_file_backup_request_intent |
||
| storage file generate-sas | cmd storage file generate-sas added parameter user_delegation_oid |
||
| storage fs directory generate-sas | cmd storage fs directory generate-sas added parameter user_delegation_oid |
||
| storage fs file generate-sas | cmd storage fs file generate-sas added |
||
| storage fs generate-sas | cmd storage fs generate-sas added parameter user_delegation_oid |
||
| storage queue generate-sas | cmd storage queue generate-sas added parameter as_user |
||
| storage queue generate-sas | cmd storage queue generate-sas added parameter auth_mode |
||
| storage queue generate-sas | cmd storage queue generate-sas added parameter user_delegation_oid |
||
| storage share generate-sas | cmd storage share generate-sas added parameter as_user |
||
| storage share generate-sas | cmd storage share generate-sas added parameter auth_mode |
||
| storage share generate-sas | cmd storage share generate-sas added parameter enable_file_backup_request_intent |
||
| storage share generate-sas | cmd storage share generate-sas added parameter user_delegation_oid |
|
Thank you for your contribution! We will review the pull request and get back to you soon. |
|
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). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
… repo sdk. This is since the path in the queue sdk is hardcoded, multiapi wrap would not work
…o `az storage fs generate-sas` and `az storage fs directory/file generate-sas`
az storage blob/container/share/file/queue generate-sas: Support user delegated sas with OAuth
az storage blob/container/share/file/queue generate-sas: Support user delegated sas with OAuthaz storage blob/container/fs/share/file/queue generate-sas: Support user delegated sas with OAuth
There was a problem hiding this 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 updates Azure Storage SDK versions to the v2026-02-06 preview API to support user-delegated SAS token generation with OAuth authentication. The major changes include:
- Removing the deprecated
azure-multiapi-storagepackage - Adding new beta versions of storage SDKs (blob, file-datalake, file-share, queue)
- Adding
--user-delegation-oidparameter to multiple generate-sas commands - Adding
--as-userparameter for share/file/queue generate-sas commands
Reviewed changes
Copilot reviewed 57 out of 62 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| setup.py, requirements*.txt | Removed azure-multiapi-storage, added beta storage SDK versions |
| operations/queue.py | Added OAuth support with user delegation key for queue SAS generation |
| operations/fileshare.py | Added OAuth support with user delegation key for share SAS generation |
| operations/filesystem.py | Added user_delegation_oid parameter to filesystem SAS generation |
| operations/fs_directory.py | Added user_delegation_oid parameter to directory SAS generation |
| operations/fs_file.py | Added new generate_sas_file_uri function with OAuth support |
| _help.py | Added help documentation for new storage fs file generate-sas command |
| test_*.py | Removed api_version_constraint decorator, added new test cases |
| recordings/*.yaml | Updated test recordings with new API version 2026-02-06 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update blob, filedatalake, fileshare, queue api versions to v2026-02-06 preview to support user delegated sas with OAuth
Now azure-multiapi-storage package has been completely dropped.
Related command
az storage blob/container/fs generate-sas: Add--user-delegation-oidaz storage fs file/directory generate-sas: New commandaz storage fs file generate-sas, add--user-delegation-oidaz storage share/file/queue generate-sas: Add--as-userand--user-delegation-oidDescription
Support specifying
--user-delegation-oidwith--auth-mode loginand--as-userto generate a sas-token to be used with Oauth (--auth-mode login)Testing Guide
History Notes
[Storage]
az storage blob/container/fs generate-sas: Add--user-delegation-oid[Storage]
az storage fs file/directory generate-sas: New commandaz storage fs file generate-sas, add--user-delegation-oid[Storage]
az storage share/file/queue generate-sas: Add--as-userand--user-delegation-oidThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.