Failed to connect Azure Arc from on premises linux server

Borappa, (Nayaka) 51 Reputation points
2022-09-15T06:32:24.163+00:00

Connected machine agent is installed successfully
Connectivity method: Priviate endpoint
server details: Linux Redhat 7

ERROR Message:

----------------------

ERROR Unable to obtain a token for deletion operation. Please wait a minute and try again. Error="DeviceCodeCredential: unable to resolve an endpoint: server response error:\n context deadline exceeded"
INFO Exit Code: AZCM0041: Failed To Get Access Token
INFO For troubleshooting, see https://aka.ms/arc/azcmerror
FATAL DeviceCodeCredential: unable to resolve an endpoint: server response error: context deadline exceeded

Azure Arc
Azure Arc
A Microsoft cloud service that enables deployment of Azure services across hybrid and multicloud environments.
474 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Martin Dimovski 1,626 Reputation points MVP
    2022-09-15T07:37:31.643+00:00

    Hi,

    Thank you for posting the question to the Q&A forum.

    From the error message AZCM0041, there are 3 possibilities.

    1. Credentials wrong
    2. The account doesn't have access to the needed tenant or subscription
    3. If you are using Service principal the Client ID is wrong or the Secret is expired

    These are the possibilities that usually pop up with this error message. So kindly I would like to ask you to check first this.

    I hope the above information can help you.

    If the ANSWER is helpful, please click "Accept Answer" and upvote it. Thanks


  2. Sharma, Rahul 0 Reputation points
    2025-01-17T13:22:16.4+00:00

    I am facing the same issue. Below is the error
    time="2025-01-16T06:58:21-08:00" level=error msg="Failed to obtain access token" time="2025-01-16T06:58:22-08:00" level=info msg="AZCM0041: Failed to Get Access Token" time="2025-01-16T06:58:22-08:00" level=info msg="Please refer to https://learn.microsoft.com/en-us/azure/azure-arc/servers/prerequisites#required-permissions for permissions required to connect/disconnect a machine. If the home tenant of the login credentials is different than the resource tenant, you must specify both tenants using --tenant-id and --user-tenant-id accordingly." time="2025-01-16T06:58:22-08:00" level=info msg="For more troubleshooting tips, please refer to https://aka.ms/arc/azcmerror" time="2025-01-16T06:58:22-08:00" level=fatal msg="unable to resolve an endpoint: server response error:

    I don't see any credential issue. Because while running the generated script web-browser pop up is not coming to authenticate. Plus, the roles which i have is contributor

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.