-
Notifications
You must be signed in to change notification settings - Fork 4k
Copy-AzStorageBlob could not run when using the UseConnectedAccount authentication #27675
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
Comments
working in the cloud shell |
the error is still happening on the windows 11. |
Here are some similar issues that might help you. Please check if they can solve your problem. Possible solution (Extracted from existing issue, might be incorrect; please verify carefully) Solution 1:I can't repro this issue. From PSH code, following 2 command will generate same storage context, no matter with or without $context = New-AzStorageContext -StorageAccountName 'sl**' -UseConnectedAccount
$context = New-AzStorageContext -StorageAccountName 'sl**' Would you please make sure the success script and the failed script only has the new context command different (with or without Reference: Solution 2:Hmm, I can't reproduce it anymore. Very weird since I reproduced it multiple times yesterday, but maybe something else. I also looked at the code and it does seem to be the same either way. So I think this can be closed, thanks! I'll re-raise if I can reproduce later. Reference: Powered by issue-sentinel |
Here are some similar issues that might help you. Please check if they can solve your problem. Possible solution (Extracted from existing issue, might be incorrect; please verify carefully) Solution 1:I can't repro this issue. From PSH code, following 2 command will generate same storage context, no matter with or without $context = New-AzStorageContext -StorageAccountName 'sl**' -UseConnectedAccount
$context = New-AzStorageContext -StorageAccountName 'sl**' Would you please make sure the success script and the failed script only has the new context command different (with or without Reference: Solution 2:Hmm, I can't reproduce it anymore. Very weird since I reproduced it multiple times yesterday, but maybe something else. I also looked at the code and it does seem to be the same either way. So I think this can be closed, thanks! I'll re-raise if I can reproduce later. Reference: Powered by issue-sentinel |
the solution is not helping |
I uninstalled and installed my powershell and az module again, the issue is not fixed |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
1 similar comment
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. |
Would you please share the command how you create the $ctx? (hide credential if any) And as you can't repro this in cloudshell, but on win11, would you please check:
|
Uh oh!
There was an error while loading. Please reload this page.
Description
Below sample could not be run when using the -UseConnectedAccount to construct the $ctx
https://learn.microsoft.com/en-us/powershell/module/az.storage/copy-azstorageblob?view=azps-13.4.0#example-2-copy-blob-from-a-blob-object
$srcBlob = Get-AzStorageBlob -Container $containerName -Blob $blobName -Context $ctx
$destBlob = $srcBlob | Copy-AzStorageBlob -DestContainer "destcontainername" -DestBlob "destblobname"
the same script is working in the cloud shell, but not from the windows 11 as below log.
Issue script & Debug output
Environment data
Module versions
Error output
The text was updated successfully, but these errors were encountered: