The user does not have permission to perform this action, tough im an admin

1,593 views
Skip to first unread message

Eylon Goor

unread,
Nov 10, 2020, 4:27:25 AM11/10/20
to Google Ads Scripts Forum
I've been trying to run a script that pauses an ad group in my account (which im its admin),
but for some reason i get "The user does not have permission to perform this action"  error when running the script. 
I have authorised the script to manage my campaigns, and even tried deleting the permission and re-giving it.

What makes it even weirder, is that a teammate of mine is able to run this script with no problems.

Any ideas?

```
function pauseAdgroup(adgroup){
  Logger.log(adgroup);
  var condition = 'Name = ' + '"' + adgroup + '"'
  Logger.log(condition);
  var adGroupIterator = AdsApp.adGroups()
      .withCondition(condition)
      .get();
  if (adGroupIterator.hasNext()) {
    var adGroup = adGroupIterator.next();
    Logger.log("Was Paused: "+ adGroup.isPaused());
    adGroup.pause();
    Logger.log("Is Paused: "+ adGroup.isPaused());
//    Logger.log('AdGroup with name = ' + adGroup.getName() +
//        ' has paused status : ' + adGroup.isPaused());
  }
  else{
    Logger.log("cant find adgroup");
  }
}
```

 

Google Ads Scripts Forum Advisor

unread,
Nov 10, 2020, 8:36:15 PM11/10/20
to adwords...@googlegroups.com

Hi Eylon,

Thanks for reaching out to us.

So our team could better investigate the error you've encountered, would you be able to share with us your customer ID and the script name via Reply privately to author or Reply to author option? In case, you encounter an error when using those mentioned options, you can send those details on this email (googleadsscr...@google.com) instead.

Regards,

Google Logo
Mark Kevin Albios
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q27senm:ref

Google Ads Scripts Forum Advisor

unread,
Nov 12, 2020, 1:14:05 AM11/12/20
to adwords...@googlegroups.com

Hi Eylon,

Thanks for sharing with us your CID.

The error (The user does not have permission to perform this action) is encountered when the account that is trying to run a script has an access level lower than Standard or Administrative. Upon checking, I can confirm that the user who runs the script has an admin access level.

That said, allow me to raise this with the team for further checking. We'll be updating this thread for any available information.

Regards,

Eylon Goor

unread,
Nov 12, 2020, 3:12:48 AM11/12/20
to Google Ads Scripts Forum

Thanks, 
Will be waiting to hear back.
Reply all
Reply to author
Forward
0 new messages