Create a Windows app with an Azure backend


This tutorial shows you how to add a cloud-based backend service to a Universal Windows Platform (UWP) app. For more information, see What are Mobile Apps. The following are screen captures from the completed app:

Completed desktop app

Completing this tutorial is a prerequisite for all other Mobile App tutorials for UWP apps.


To complete this tutorial, you need the following:

  • An active Azure account. If you don't have an account, you can sign up for an Azure trial and get up to 10 free mobile apps that you can keep using even after your trial ends. For details, see Azure Free Trial.
  • Windows 10.
  • Visual Studio Community.
  • Familiarity with UWP app development. Visit the UWP documentation to learn how to get set up to build UWP apps.

Create a new Azure Mobile App backend

Follow these steps to create a new Mobile App backend.

  1. Sign in to the Azure portal.

  2. Click Create a resource.

  3. In the search box, type Mobile Apps.

    Azure portal with Mobile Apps Quickstart highlighted

  4. In the results list, select Mobile Apps Quickstart, and then select Create.

  5. Choose a unique App name. This will also be part of the domain name for your App Service.

  6. Under Resource Group, select an existing resource group or create a new one (using the same name as your app).

  7. Click Create. Wait a few minutes for the service to be deployed successfully before proceeding. Watch the Notifications (bell) icon in the portal header for status updates.

You have now provisioned an Azure Mobile App backend that can be used by your mobile client applications. Next, you will download a server project for a simple "todo list" backend and publish it to Azure.

Configure the server project

  1. Click the App Services button, select your Mobile Apps back end, select Quickstart, and then select your client platform (iOS, Android, Xamarin, Cordova).

    Azure portal with Mobile Apps Quickstart highlighted

  2. If a database connection is not configured, create one by doing the following:

    Azure portal with Mobile Apps Connect to database

    a. Create a new SQL database and server. You may need to leave the connection string name field to the default value of MS_TableConnectionString in order to complete step 3 below.

    Azure portal with Mobile Apps create new database and server

    b. Wait until the data connection is successfully created.

    Azure portal notification of successful creation of data connection

    c. Data connection must be successful.

    Azure portal notification, "You already have a data connection"

  3. Under 2. Create a table API, select Node.js for Backend language.

  4. Accept the acknowledgment, and then select Create TodoItem table. This action creates a new to-do item table in your database.


    Switching an existing back end to Node.js overwrites all contents. To create a .NET back end instead, see Work with the .NET back-end server SDK for Mobile Apps.

Download and run the client project

Once you have configured your Mobile App backend, you can either create a new client app or modify an existing app to connect to Azure. In this section, you download a UWP sample app project that is customized to connect to your Mobile App backend.

  1. Back in the Quick start blade for your Mobile App backend, click Create a new app > Download, then extract the compressed project files to your local computer.

    Download Windows quickstart project

  2. Open the UWP project and press the F5 key to deploy and run the app.

  3. In the app, type meaningful text, such as Complete the tutorial, in the Insert a TodoItem text box, and then click Save.

    Windows quickstart complete desktop

    This sends a POST request to the new mobile app backend that's hosted in Azure.


You can add the UWP app project to the same solution as the server project if you are using the .NET backend. This makes it easier to debug and test both the app and the backend in the same Visual Studio solution. To add a UWP app project to the backend solution, you must be using Visual Studio 2017 or later.

Next steps

  • Add authentication to your app
    Learn how to authenticate users of your app with an identity provider.
  • Add push notifications to your app
    Learn how to add push notifications support to your app and configure your Mobile App backend to use Azure Notification Hubs to send push notifications.
  • Enable offline sync for your app
    Learn how to add offline support your app using a Mobile App backend. Offline sync allows end-users to interact with a mobile app—viewing, adding, or modifying data—even when there is no network connection.