Azure DevOps tenant identifier '$(tenantid)' is neither a valid DNS name, nor a valid external domain
Getting following errors when running Azure DevOps pipeline:
AADSTS900023: Specified tenant identifier '$(tenantid)' is neither a valid DNS name, nor a valid external domain
Detailed errors are here:
Error: building account: getting authenticated object ID: listing Service Principals: autorest.DetailedError{Original:adal.tokenRefreshError{message:"adal: Refresh request failed. Status Code = '400'. Response body: {"error":"invalid_request","error_description":"AADSTS900023: Specified tenant identifier '$(tenantid)' is neither a valid DNS name, nor a valid external domain. Trace ID: ee0ea85e-0569-4d7e-909c-42525144c100 Correlation ID: 1217d8a9-ee42-4292-aedc-162d53119585 Timestamp: 2024-02-11 21:27:25Z","error_codes":[900023],"timestamp":"2024-02-11 21:27:25Z","trace_id":"ee0ea85e-0569-4d7e-909c-42525144c100","correlation_id":"1217d8a9-ee42-4292-aedc-162d53119585","error_uri":"https://login.microsoftonline.com/error?code=900023"} Endpoint https://login.microsoftonline.com/$(tenantId)/oauth2/token?api-version=1.0", resp:(*http.Response)(0xc002352d80)}, PackageType:"azure.BearerAuthorizer", Method:"WithAuthorization", StatusCode:400, Message:"Failed to refresh the Token for request to https://graph.windows.net/%24%28tenantId%29/servicePrincipals?%24filter=appId+eq+%27%24%28servicePrincipalId%29%27&api-version=1.6", ServiceError:[]uint8(nil), Response:(*http.Response)(0xc002352d80)}
│