Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

147
Vistas
Does Google Apps Script Session Information Work Different for Gmail accounts vs other Workspace Domain Accounts?

I'm writing a signoff script in Google Apps Script for GSheets that allows users to select their name from a dropdown list in a cell, then if the name matches the currently active account, another function will run to lock the row etc. Everything is working perfectly on my gmail account, but when the client tries to run the script using an account managed by google but with a non-gmail domain, the email address check fails. I'm waiting on the client to send me the log info as I don't have permissions to access it in their file, but wanted to see if anyone else had run into this issue.

In the example code with modified company and username, the code does NOT work, but if I set atDomainString to "@gmail.com" and name to my gmail address and run under my account, it does.

const atDomainString = "@redactedcompany.com";
const name = "JSmith";

    function userMatchesSignature(name) {
      let user = Session.getEffectiveUser().toString().toLowerCase();
      let signUser = (name + atDomainString).toLowerCase();
      Logger.log("User: <"+user + "> vs <" + signUser +">");
    
      return user === signUser;
    }
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Try to grab their error message to confirm what's going on. But most likely they're blocking access to the client ID. Since the scripts that try to access user data might be blocked.

Depending on the scopes you're using on your project, they might need to verify the app https://support.google.com/cloud/answer/7454865

Best practice

  • Create the project using a domain account instead of a free Gmail account. Because they might run into scopes issues. In their domain, they can mark the app as internal.
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda