You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Storage/Storage/Common/SasTokenHelper.cs
+8
Original file line number
Diff line number
Diff line change
@@ -755,6 +755,10 @@ public static string GetBlobSharedAccessSignature(AzureStorageContext context, B
755
755
}
756
756
if(generateUserDelegationSas)
757
757
{
758
+
if(context.StorageAccountName.StartsWith("["))
759
+
{
760
+
thrownewInvalidOperationException("Please provide '-Context' as a storage context created by cmdlet `New-AzStorageContext` with parameters include '-StorageAccountName'.");
@@ -784,6 +788,10 @@ public static string GetDatalakeGen2SharedAccessSignature(AzureStorageContext co
784
788
}
785
789
if(generateUserDelegationSas)
786
790
{
791
+
if(context.StorageAccountName.StartsWith("["))
792
+
{
793
+
thrownewInvalidOperationException("Please provide '-Context' as a storage context created by cmdlet `New-AzStorageContext` with parameters include '-StorageAccountName'.");
thrownewInvalidOperationException("Please provide '-Context' as a storage context created by cmdlet `New-AzStorageContext` with parameters include '-StorageAccountName', or provide the source blob object get with such storage context.");
0 commit comments