2

So when you add either service, you exclude the other one (see picture).

Once you have added either the reports_v1 or directory_v1 you can no longer select the Admin SDK API to select the other service. How do I go about using both in the same project/script?

enter image description here

Rubén
  • 34,714
  • 9
  • 70
  • 166
SL8t7
  • 617
  • 2
  • 9
  • 27

2 Answers2

1

This issue seems to be a bug, that has already been reported on Google's Issue Tracker

I recommend you to "star" the issue to increase visibility.

In the meantime, you can change as a workaround to the legacy editor and add both services there:

enter image description here

Once you add the services, you can change back to the new IDE and both service will stay selected:

enter image description here

ziganotschka
  • 25,866
  • 2
  • 16
  • 33
  • You can't though? If you add the Admin SDK API under either Reports or Directory, you can't then add the Admin SDK again? – SL8t7 May 16 '22 at 15:59
  • 1
    The moment I posted this answer it worked for me, however now I am encountering the same issue like you. I found that it si a bug that has already been reported on Google's issue tracker, so I will modify my answer accordingly. – ziganotschka May 17 '22 at 14:16
1

complementing the first answer provided in which the idea is to use the previous IDE to enable both services...

reverting to the previous IDE might not be possible, in that case, you need to

  1. click gear icon (project settings) and select 'Show "appsscript.json" manifest file in editor'
  2. then in the appscript.json manifest file add both services as shown below under the EnabledAdvancedServices:
{
  "timeZone": "America/Bogota",
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8",
  "dependencies": {
    "enabledAdvancedServices": [
      {
        "userSymbol": "AdminDirectory",
        "serviceId": "admin",
        "version": "directory_v1"
      },
      {
        "userSymbol": "AdminReports",
        "serviceId": "admin",
        "version": "reports_v1"
      }
    ]
  }
}

source: https://issuetracker.google.com/issues/199185661?pli=1 (from the @ziganotschka answer)

Francisco Cortes
  • 1,121
  • 10
  • 19