[BUG] LogsQueryClientBuilder.queryWorkspace fails to acquire token: scope null/.default openid profile offline_access is not valid #33062
Labels
Azure.Identity
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Describe the bug
Using the
LogsQueryClientBuilder
to build aLogsQueryClient
with anyTokenCredential
throws a MsalServiceException when querying the workspace viaqueryWorkspace(...)
Exception or Stack Trace
To Reproduce
Create a
LogsQueryClient
object using theLogsQueryClientBuilder
and try to query the workspace. Authentication will fail.Code Snippet
Expected behavior
LogsQueryClientBuilder
builds the client in such a way that it is able to acquire a BearerToken.Setup (please complete the following information):
Additional context
I've had a look into
AzureLogAnalyticsImplBuilder
and the issue is thehost
attribute being set after the call tocreateHttpPipeline()
. In versioncom.azure:azure-monitor-query:1.0.12
thehost
attribute is set before, avoiding thenull
scope issue.Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
The text was updated successfully, but these errors were encountered: