Error Accessing Client Account's Campaigns Under Manager Account: "User doesn't have permission to access customer"

44 views
Skip to first unread message

adi aharonov

unread,
Aug 1, 2023, 10:56:12 AM8/1/23
to Google Ads API and AdWords API Forum
I am facing an issue while trying to fetch campaigns from a test client account under my test manager account using the Google Ads API. While executing the query, I receive the following error:

ud {
  errors: [
    _d {
      error_code: [p],
      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"
    }
  ],
  request_id: 'mI1hCRLhmiYhN2b8HmdTPQ'
}


I have made sure that I am using the correct manager's customer ID and have set it in the 'login-customer-id' header, but I still encounter this error. I am trying to get campaigns from a client account that's under the management of my manager account, all within a testing environment.

Has anyone encountered a similar issue or can provide guidance on resolving this? Is this even possible to achieve using a test account? If this approach is not suitable for test accounts, are there alternative solutions or workarounds that could be suggested? Any insights, assistance, or recommendations would be greatly appreciated.

Thank you!

Google Ads API Forum Advisor

unread,
Aug 1, 2023, 2:28:07 PM8/1/23
to adi.a...@gmail.com, adwor...@googlegroups.com

Hi Adi,

Thank you for reaching out to the Google Ads API support team.

With regard to your concern for the USER_PERMISSION_DENIED, this error usually indicates that the user / email address you used to generate your OAuth2 credentials does not have access to the customer ID you specified in your request. 

That being said, 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. 

Let us know how it goes on your end if this resolves your issue. In the event that the error persists after trying the suggested solution, then you may provide to us the updated complete request and response logs with the request-id generated along with the email address used to generate the OAuth credentials from your end so we can investigate further. 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 (https://developers.google.com/google-ads/api/docs/client-libs). 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.

Reference links included in this email:

This message is in relation to case "ref:_00D1U1174p._5004Q2nZnrw:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages