Google seems to have done some changes with Apps Script when they included the service in Google Workspace Core Services this summer (https://workspaceupdates.googleblog.com/2026/06/google-apps-script-workspace-core-service.html)
The sync has stopped working due to this change and we now need to add oauthScopes to the appscript.json in the Apps Script project for it to work.
The scope handling can be automated from code by running the function below (https://developers.google.com/apps-script/concepts/scopes):
ScriptApp.requireScopes(ScriptApp.AuthMode.FULL, [
'https://mail.google.com/',
'https://www.googleapis.com/auth/spreadsheets'
]);
I don't have permission to push code to the repo. Either add me as a member in the github org, then I can push a branch and create a PR. Or let someone else do it.
function synkroniseraAnvandareOchGrupper() {
kontrolleraGoogleFunktionKrav();
synkroniseraAnvandare();
synkroniseraGrupperAllaRader();
}
function kontrolleraGoogleFunktionKrav() {
ScriptApp.requireScopes(ScriptApp.AuthMode.FULL, [
'https://www.googleapis.com/auth/admin.directory.user',
'https://www.googleapis.com/auth/admin.directory.group',
'https://www.googleapis.com/auth/admin.directory.orgunit',
'https://www.googleapis.com/auth/apps.groups.settings',
'https://www.googleapis.com/auth/script.external_request',
'https://www.googleapis.com/auth/spreadsheets'
]);
}
Google seems to have done some changes with Apps Script when they included the service in Google Workspace Core Services this summer (https://workspaceupdates.googleblog.com/2026/06/google-apps-script-workspace-core-service.html)
The sync has stopped working due to this change and we now need to add oauthScopes to the appscript.json in the Apps Script project for it to work.
The scope handling can be automated from code by running the function below (https://developers.google.com/apps-script/concepts/scopes):
I don't have permission to push code to the repo. Either add me as a member in the github org, then I can push a branch and create a PR. Or let someone else do it.