G Suite Business customers can preview App Maker. Ask your domain admin to apply for early access.

Run as user or developer

App Maker uses a specific account when it runs the server part of an app—the app user’s account or the account of the developer who publishes the app). App Maker uses the account when the app runs server scripts and when it makes API calls to Google Apps Script services (G Suite Services, Script Services, and Advanced Google services). The account used for running code is often referred to as the execution identity.

As a developer, you choose the execution identity for an app project:

  • User’s account—The app uses the account and identity of the person who runs the app. Users access their own Drive files and G Suite data, and method calls to Google Apps Script services use the user’s identity. For example:

    • The DriveApp.getFiles() method displays a list of the user’s files.
    • The MailApp.SendMail() method sends an email from the user as the sender.
    • The Calendar.createEvent() method creates a calendar event in the user’s calendar.
  • Developer’s account—The app uses the account and identity of the person who publishes the app. If you publish the app, users access your Drive files and G Suite data, and method calls to Google Apps Script services use your identity. For example:

    • The DriveApp.getFiles() method displays a list of your files, not the user’s files.
    • The MailApp.SendMail() method sends an email from you as the sender.
    • The Calendar.createEvent() method creates a calendar event in your calendar.

Use the default setting

For each app project, App Maker uses a default setting for the execution identity:

  • Pre-existing projects—For app projects that were created prior to the introduction of this feature, the default setting is Developer’s account. This setting preserves the functionality of pre-existing projects.
  • New projects—For projects that you create after the introduction of this feature, the default setting is User’s account.

Choose the execution identity

To choose the execution identity for an app project:

  1. Open App Maker.
  2. Click Settings settings chevron_right App Settings chevron_right Run the app using, and select User’s account or Developer’s account.

All deployments of the app that are published or republished later use this execution identity.

Change the execution identity

Although it’s rare to want to change the execution identity of a published app that users use, you can. Be sure to test the modified app thoroughly.

You can change the execution identity of an app project from User's account to Developer's account, or vice versa. App Maker uses the new execution identity when you publish or republish the app after the change. It doesn’t change existing app deployments (you might not want to do that).

To change the execution identity of an existing app deployment, you must change the execution identity of the app project and republish the app. Editing an app, for example, to change who can access the app, also republishes the app.
To change the execution identity of an app project:

  1. Open App Maker.
  2. Click Menu menu Open and select an app.
  3. Click Settings settings chevron_right App Settings chevron_rightRun the app using, and select the other execution identity ( User’s account or Developer’s account). All deployments of the app that are published or republished later use this execution identity.

If an app uses a developer’s account

In some cases, you might want to give users access to your data as the developer (the publisher of the app); for example, to allow other users to add entries to your calendar or to send email from your account. In this case, the app can run as the developer.

If you run an app as the developer, consider these tips:

Manage your identity

For some APIs, you can use flags that conceal your identity to some degree); for example, using the noreply flag for MailApp.sendMail.

Confirm that testing is comprehensive

An app that runs as the developer can appear to work correctly when it doesn’t. If the app gives access to Drive files and G Suite data, you see your own files and data, which you expect because you’re the user. The app seems to be working fine, but other users also see your Drive files and G Suite data, not theirs. To avoid this mistake, ensure that other users test deployments that you have published (not just deployments that they publish).