I have a published Web App in Apps Script set to "anyone in my domain can view" that I need to "execute as me". If an end user is only signed into Google accounts that aren't in my domain, they get an ugly
Sorry, unable to open the file at this time.
Please check the address and try again.
error message. If I embed the published Web App within a Google Site and publish the Site as "people in my domain can view", then users only signed into Google accounts that aren't in my domain get the ugly
404. That’s an error.
The requested URL was not found on this server. That’s all we know.
error. What I want is to redirect end users to sign into their Workspace account on my domain if they aren't already authenticated, or pass through if they are. I've even tried:
https://accounts.google.com/AccountChooser?hd=mydomain.com&continue=https%3A%2F%2Fscript.google.com%2Fa%2Fmacros%2Fmydomain.com%2Fs%2MY-APP-URL%2Fexec
but that forces a re-auth if they're already authenticated. What are my other options?