Facing authentication error with manageIdentity for resource https://api.loganalytics.io/ on azure dev ops pipeline
I am working on the validation of an Azure query using logQueryClient, which requires credentials to initialize. When I perform interactive authentication on my local machine, it works fine. However, when I use managed identity-based authentication in the pipeline, I encounter the following error:
"Query validation failed: (InvalidTokenError) The provided authentication is not valid for this resource
Code: InvalidTokenError
Message: The provided authentication is not valid for this resource
Inner error: {
"code": "InvalidAuthenticationTokenTenant",
"message": "The access token is from the wrong issuer 'https://sts.windows.net/124edf19-b350-4797-aefc-3206115ffdb3/'. It must match the tenant 'https://sts.windows.net/***/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/***' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later."}"