Updated: January 25, 2014
Windows Azure Mobile Services enables you to securely store values as app settings, which can be accessed by your server scripts at runtime. App setting are stored encrypted and are set, updated, and deleted by administrators in the Windows Azure Management Portal. When you store persisted data, such as login credentials or shared keys, in app settings, you have a single storage point that can be accessed from various server scripts in your mobile service.
When you store credentials for other services, such as Twitter OAuth credentials, directly in server scripts, these credentials can end up on a local computer. This means that when using source control to publish server scripts, care must be taken to restrict access to script files that contain credentials. Because of this, valuable credentials should be stored as app settings instead of directly in server scripts.
You can access stored settings from the config property of the service object in a custom API. The following example gets the value of a custom setting named
In a table operation or schedule job script, you can access the app settings by loading the mobileservice-config Node.js module. The following example gets JSON settings object by using the global require function to load the configuration module for the mobile service:
Consider the following when storing data in app settings:
Names must be unique, in an case-insensitive comparison.
Names must be less than 60 characters and values must be less than 1000 characters.
The maximum number of settings for a single mobile service is 1000.