Login-customer-id as Manager Id but get User doesn't have permission to access customer

76 views
Skip to first unread message

Nhat Ho

unread,
Jul 26, 2022, 12:38:56 AM7/26/22
to Google Ads API and AdWords API Forum
Dear Google Ads Support,
Currently, I have set loginCustomerId as ManagerId but when I try to query I get permission error.

"SELECT customer_client.id, customer_client.descriptive_name " +
"FROM customer_client " +
"WHERE customer_client.level <= 1"

Error: errors {\n  error_code {\n    authorization_error: USER_PERMISSION_DENIED\n  }\n  message: \"User doesn\\'t have permission to access customer. Note: If you\\'re accessing a client customer, the manager\\'s customer id must be set in the \\'login-customer-id\\' header. See https://developers.google.com/google-ads/api/docs/concepts/call-structure#cid\"\n}\nrequest_id: \"rotxDQoc2kJusDVsOUqLNQ\"\n\n","timestamp":{"seconds":1658809717,"nanos":616000000},"thread":"vert.x-eventloop-thread-2","severity":"ERROR"}

Google Ads API Forum Advisor

unread,
Jul 26, 2022, 2:33:48 AM7/26/22
to hominh...@gmail.com, adwor...@googlegroups.com
Hi Nhat,

Thank you for raising this concern to the Google Ads API team.
 
With regard to your concern, it appears that you have encountered the authorization_error: USER_PERMISSION_DENIED. Upon seeing the error, it is mentioned that "User doesn't have permission to access customer.", that said, kindly note that you will need to ensure that the user / email address you used to generate the credentials indeed has access to the account in your request. If the user / email address has access or is associated with the MCC / manager account, you will need to specify the MCC / manager account's ID without hyphens (-) as the value of the login-customer-id field.

If error still persists even following the above guide, then you may provide the complete request and response logs with request ID and request header generated on your end. If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Carmela
Google Ads API Team
 
 

ref:_00D1U1174p._5004Q2d1Qhe:ref

Nhat Ho

unread,
Jul 26, 2022, 3:20:50 AM7/26/22
to Google Ads API and AdWords API Forum
Dear Adsapi,
Currently, I am migrate from Adwords to Google Ads API. 
Everything work fine before, my account have access to Google Ads Manager account. 
But I don't have permission to view Oauth2 credentials(company policy). 
So my guess the problem is the old credentials don't have access to my account 
Is there any method for me to confirm that this is the problem above?

Thanks you for replying
Regards,

Google Ads API Forum Advisor

unread,
Jul 26, 2022, 4:33:35 AM7/26/22
to hominh...@gmail.com, adwor...@googlegroups.com
Hi Nhat,

Thank you for raising your concern to my team.

So that we can check if your credentials have access to the manager account, would you be able to provide the complete request and response logs with request ID and request header generated on your end and the email address that you've used in generating those credentials?


You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2d1Qhe:ref
Reply all
Reply to author
Forward
0 new messages