AzureStorageExplorer icon indicating copy to clipboard operation
AzureStorageExplorer copied to clipboard

An authentication error occurs after attaching the service via OAuth, even though the correct RBAC role is assigned

Open v-xianya opened this issue 2 months ago • 6 comments

Storage Explorer Version

1.40.1 (109)

Regression From

Not a regression

Architecture

arm64

Storage Explorer Build Number

20251020.1

Platform

All

OS Version

Windows 11 arm64/MacOS Sequoia 15.6.1/Linux Ubuntu 22.04

Bug Description

An authentication error occurs after attaching the service via OAuth, even though the correct RBAC role is assigned.

Resource Types

Blobs, ADLS Gen2 blobs, file shares, queues, tables

Authentication Method

None

Connection Type

Attachment

Steps to Reproduce

  1. Expand one storage account (The storage account has been assigned correct RBAC role) -> Blob Containers.
  2. Select a blob container and attach it using OAuth.
  3. After the container is attached successfully,
  4. Check whether any error occurs.

Actual Experience

An authentication error occurs.

Image

Error details: Server failed to authenticate the request. Please refer to the information in the www-authenticate header. RequestId:72eaa386-201e-0069-7c9f-416cb1000000 Time:2025-10-20T09:00:34.2540146Z

Expected Experience

No error occurs.

Additional Context

  1. Successfully expanded and opened the service with the RBAC role assigned (the “Disable Usage of Keys” setting is enabled).
  2. The following screenshot shows the role assignment
Image
  1. This issue also occurs even when the role is assigned at the subscription level.
  2. Here is the app log:

2025-10-20_085055.zip

v-xianya avatar Oct 20 '25 09:10 v-xianya

I think this is by design. Storage Explorer calls the Get Account Information API to get account info, which requires a key or SAS. Since you've turned off key usage, you no longer have any valid authentication methods, so the errors are expected.

However, let me dig a little deeper. This does sound like something we shouldn't be trying if keys aren't available.

craxal avatar Oct 20 '25 17:10 craxal

@craxal This issue also reproduces when setting 'Disable Usage of Keys' is disabled.

v-xianya avatar Oct 21 '25 01:10 v-xianya

@v-xianya Please verify whether you have permission to list keys or if key authentication is enabled on the storage account.

craxal avatar Oct 21 '25 16:10 craxal

@craxal The key access is enabled on the storage account.

Image

v-xianya avatar Oct 22 '25 01:10 v-xianya

@v-xianya Do you also have permission to list keys?

craxal avatar Oct 22 '25 16:10 craxal

Hi @craxal YES, I have permission to list keys,

Image

v-xianya avatar Oct 23 '25 06:10 v-xianya