NOTE: Azure Mobile Services is deprecated. Documentation on the new service, Azure Mobile Apps, can be found here.
The Visual Studio Services Manager for connected services lets you integrate Microsoft services like Azure Mobile Services, Office 365, and other services into your app built with Visual Studio Tools for Apache Cordova. The manager makes it easy to add services without leaving Visual Studio.
In this article:
For information and tutorials on using connected services like Azure and o365 with Cordova apps in Visual Studio, see the following articles and blog posts.
Azure Tables (using Azure Mobile Services)
Azure Storage (using Azure Mobile Services)
To add a connected service, first open the Visual Studio Services Manager.
In Solution Explorer, open the shortcut menu for your project, and then choose Add, Connected Service.
The following sections explain how to add different types of connected services.
Azure Mobile Services let you add cloud-based services such as data and push notifications to your app.
If you don't have an Azure account, create one.
In Visual Studio, open the Services Manager, choose Windows Azure, and then choose Manage subscriptions.
Sign in to your account.
Accounts available for your use will be listed here.
In the Services Manager, choose Create service to add a new Azure Mobile Service, fill out the required information, and then choose OK.
To get started, you will typically choose Create a free SQL Database, and then supply the Server user name, Server password, and Server password confirmation. The steps required here are similar to steps shown in the section "Create a new mobile service from Visual Studio" in this article.
The new service appears in the Services Manager list of connected services.
In the Services Manager, choose OK.
Visual Studio adds a service.js file to your project under services/azure_service_name/. This file contains your Azure key for accessing and using the service in your app.
If you’re creating a TypeScript app, you’ll need a TypeScript definition (.d.ts) Files&referringTitle=Documentation) (.d.ts file) that describes the API surface of the Azure service you’re using. You can find definitions created by the community in NuGet, which you can access from Visual Studio.
From the shortcut menu for the project in Solution Explorer, choose Manage NuGet Packages.
Search for “azure-mobile-services-client”.
Choose one of the “azure-mobile-services-client.TypeScript.DefinitelyTyped” definitions, and then choose Install to add the definition file to your project.
For more information about the definitions, open the Id link in the right pane.
You can develop apps by using the Office 365 APIs to access services such as email, calendar, and contacts. For more information, see Announcing Office 365 API Tools for Visual Studio on the Apps for Office and SharePoint blog.
Install the Visual Studio extension for Office 365 API Tools.
In Visual Studio, open Services Manager, and then choose Office 365 APIs.
Tip If you don't see the Office 365 APIs in the Services Manager after installing them, close and reopen Visual Studio.
If this is the first time you’re adding the service in Visual Studio, you might be asked to sign in to your Office 365 developer account. Choose Sign in.
After you sign in, you can configure permissions for different Office 365 services.
Did you find this article helpful?
We're sorry to hear that! Feel free to email our team with your question.