Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
99 commits
Select commit Hold shift + click to select a range
2a85a81
c1
divyaswarnkar Jan 30, 2018
ef7c9fd
c1
divyaswarnkar Jan 30, 2018
15d006f
m2
divyaswarnkar Jan 30, 2018
4daa07d
c3
divyaswarnkar Jan 30, 2018
44157c0
c3
divyaswarnkar Jan 30, 2018
706eb74
c4
divyaswarnkar Jan 30, 2018
ecf57f8
c5
divyaswarnkar Jan 31, 2018
de21fd3
edit pass: app-service-mobile-node-backend-how-to-use-server-sdk
ShawnJackson Feb 2, 2018
398c8cd
c6
divyaswarnkar Feb 3, 2018
6eb4716
c7
divyaswarnkar Feb 3, 2018
79a80d9
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-…
ShawnJackson Feb 6, 2018
4b595d9
edit pass: app-service-mobile-node-backend-how-to-use-server-sdk
ShawnJackson Feb 7, 2018
ad0454b
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-…
ShawnJackson Feb 7, 2018
fb3574e
Update header for all emotion API docs to reflect the fact that the p…
Feb 7, 2018
0954551
edit pass: app-service-mobile-node-backend-how-to-use-server-sdk
ShawnJackson Feb 7, 2018
b1dd3ca
updates
Feb 8, 2018
474d0b0
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-…
ShawnJackson Feb 8, 2018
200c36d
edit pass: app-service-mobile-node-backend-how-to-use-server-sdk
ShawnJackson Feb 8, 2018
e7a0372
edit pass: app-service-mobile-node-backend-how-to-use-server-sdk
ShawnJackson Feb 9, 2018
b89dd97
Update storage-files-release-notes.md
klaaslanghout Feb 9, 2018
560a149
Update app-service-mobile-node-backend-how-to-use-server-sdk.md
ShawnJackson Feb 12, 2018
dd74704
specify specific version
ausfeldt Feb 13, 2018
83e6e75
adding new tutorial for user assigned msi
daveba Feb 13, 2018
bd389ee
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-…
daveba Feb 13, 2018
136509c
fixing broken links
daveba Feb 13, 2018
febbc01
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-…
daveba Feb 13, 2018
cdfefe4
Revert "Update header for all emotion API docs to reflect the fact th…
Feb 13, 2018
021f537
Update Face API Python quickstart based on Jupyter notebooks
Feb 13, 2018
0642a39
Added style fixes to increase AcroLinx score
Feb 14, 2018
ff291ee
'c4
divyaswarnkar Feb 14, 2018
da587d4
'c7
divyaswarnkar Feb 14, 2018
a15e533
add the ADLS requirements
mumian Feb 14, 2018
c8a489e
remove tableau
mumian Feb 14, 2018
5efda01
two new areas of ux interactive testing panel
v-geberr Feb 14, 2018
608ecd0
edits
v-geberr Feb 14, 2018
af555da
Update sql-database-develop-error-messages.md
CarlRabeler Feb 14, 2018
28cc038
Fixing up metadata and headings
sethmanheim Feb 14, 2018
a2fe6d5
format
cherylmc Feb 14, 2018
1e11dba
Acrolinx
sethmanheim Feb 14, 2018
b08649e
Update sql-database-resource-limits.md
CarlRabeler Feb 14, 2018
0514535
Merge pull request #33373 from CarlRabeler/patch-1
Feb 14, 2018
9cef046
Updated to version 9.4.1.
daveirwin1 Feb 14, 2018
f503bcb
Merge pull request #33370 from v-geberr/0214-testing-panel
ktoliver Feb 14, 2018
2ca2712
Merge pull request #33073 from ShawnJackson/app-service-mobile-node-b…
Ja-Dunn Feb 14, 2018
7882a3d
Update sql-database-resource-limits.md
CarlRabeler Feb 14, 2018
4dcbf4f
corrected lik
Feb 14, 2018
830dd24
Merge pull request #33380 from cherylmc/npm
Feb 14, 2018
570a59f
Merge pull request #33378 from sethmanheim/wk2-14
PRMerger14 Feb 14, 2018
bbd3c64
Update sql-database-resource-limits.md
CarlRabeler Feb 14, 2018
49c2d74
new faq, clean up of others
v-geberr Feb 14, 2018
8ef84c1
borders to images
Feb 14, 2018
0f2aee0
Merge pull request #33367 from mumian/0214-dj-adls
PRMerger15 Feb 14, 2018
4c4a962
Merge pull request #33368 from mumian/0214-spark-tableau
Feb 14, 2018
ec9bbf4
Merge pull request #33381 from daveirwin1/master
PRMerger16 Feb 14, 2018
259e945
Merge pull request #33382 from ausfeldt/patch-4
Feb 14, 2018
2f3a211
update TOC and fix article structure
daveba Feb 14, 2018
18acb66
format2
cherylmc Feb 14, 2018
e24dece
Merge branch 'master' of https://github.com/Microsoft/azure-docs-pr i…
cherylmc Feb 14, 2018
4a90cd4
Clarify the AND operator in event grid filtering
kgremban Feb 14, 2018
13c8e62
format
cherylmc Feb 14, 2018
f8c457b
minor updates
daveba Feb 14, 2018
55141d0
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-…
daveba Feb 14, 2018
3bebe18
format
cherylmc Feb 14, 2018
676267d
updates to image
Feb 14, 2018
14867df
Update api-management-modify-content-layout.md
Juliako Feb 14, 2018
a44d44d
Merge pull request #33386 from cherylmc/npm
PRMerger20 Feb 14, 2018
695faf6
Merge pull request #33287 from georgewallace/imageupdates
ktoliver Feb 14, 2018
6cf025f
Merge pull request #32527 from divyaswarnkar/liq_update
ktoliver Feb 14, 2018
13d939b
Update api-management-modify-content-layout.md
Juliako Feb 14, 2018
c50e26c
Merge pull request #33379 from CarlRabeler/patch-2
PRMerger15 Feb 14, 2018
0206db6
Update api-management-modify-content-layout.md
Juliako Feb 14, 2018
3f66b10
Update api-management-modify-content-layout.md
Juliako Feb 14, 2018
7e885ff
Merge pull request #33383 from v-geberr/0214-faq-data-extraction
PRMerger13 Feb 14, 2018
56b43ab
Update api-management-modify-content-layout.md
Juliako Feb 14, 2018
0754a27
key mgmt
v-geberr Feb 14, 2018
15138a9
Merge pull request #33390 from Juliako/patch-1
ktoliver Feb 14, 2018
7d4bc5c
edits
v-geberr Feb 14, 2018
baf9e0b
edits
v-geberr Feb 14, 2018
8f7658f
updating metadata for Backup articles, so they appear in Skyeye queries
markgalioto Feb 14, 2018
dc16fc5
edit
v-geberr Feb 14, 2018
86efa76
Merge pull request #33388 from kgremban/feb14-eventgridfilter
PRMerger18 Feb 14, 2018
0756b75
Merge pull request #33399 from markgalioto/ab-2-14-2018
PRMerger12 Feb 14, 2018
943b4b8
Merge pull request #33397 from v-geberr/0214-publishing-regions
Ja-Dunn Feb 14, 2018
b61acf2
Merge pull request #33398 from v-geberr/0214-key-mgmt
Ja-Dunn Feb 14, 2018
b352e69
Fix comments from PR: add another H2 section and remove en-us from URLs
Feb 14, 2018
9c33c19
entity extraction
v-geberr Feb 14, 2018
5e1c716
Merge pull request #33089 from klaaslanghout/patch-12
Ja-Dunn Feb 14, 2018
1c5a46b
date
v-geberr Feb 14, 2018
0ae8aee
prs
CarlRabeler Feb 14, 2018
0795a50
Merge pull request #33335 from drdarshan/master
Ja-Dunn Feb 14, 2018
b34d7a4
Update for high availability
ecfan Feb 14, 2018
ff70869
Merge pull request #33407 from CarlRabeler/PRS2
PRMerger18 Feb 14, 2018
7ed3d49
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs …
v-alje Feb 14, 2018
95f4c35
Fix Acrolinx issues
ecfan Feb 14, 2018
6cbc063
Fix Acrolinx issues
ecfan Feb 14, 2018
0e09051
Merge pull request #33307 from daveba/msi-tutorial-linux-vm-access-co…
Ja-Dunn Feb 14, 2018
38ef00d
Merge pull request #33409 from MicrosoftDocs/FromPublicRepo
v-alje Feb 14, 2018
c1ddeff
Merge pull request #33405 from v-geberr/0214-entity
Ja-Dunn Feb 14, 2018
e6ea888
Merge pull request #33408 from ecfan/ha-update
Feb 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions articles/active-directory/pp/TOC.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
items:
- name: From a Linux VM
href: msi-tutorial-linux-vm-access-arm.md
- name: Use a VM MSI to access Azure Cosmos DB
items:
- name: From a Linux VM
href: msi-tutorial-linux-vm-access-cosmosdb.md
- name: Use a VM MSI to access Azure storage
items:
- name: From a Linux VM using access key
Expand Down
265 changes: 265 additions & 0 deletions articles/active-directory/pp/msi-tutorial-linux-vm-access-cosmosdb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
---
title: Use a user-assigned Managed Service Identity (MSI) on a Linux VM to access Azure Cosmos DB
description: A tutorial that walks you through the process of using a User-Assigned Managed Service Identity (MSI) on a Linux VM, to access Azure Cosmos DB.
services: active-directory
documentationcenter:
author: daveba
manager: mtillman
editor:

ms.service: active-directory
ms.devlang: na
ms.topic: article
ms.tgt_pltfrm: na
ms.workload: identity
ms.date: 02/14/2018
ms.author: skwan
ROBOTS: NOINDEX,NOFOLLOW
---
# Use a user-assigned Managed Service Identity (MSI) on a Linux VM to access Azure Cosmos DB

[!INCLUDE[preview-notice](~/includes/active-directory-msi-preview-notice-ua.md)]

This tutorial shows you how to create and use a user-assigned Managed Service Identity (MSI) from a Linux Virtual Machine, then use it to access Azure Cosmos DB. You learn how to:

> [!div class="checklist"]
> * Create a User Assigned Managed Service Identity (MSI)
> * Assign the user-assigned MSI to a Linux Virtual Machine
> * Grant the MSI access to an Azure Cosmos DB instance
> * Get an access token using the user-assigned MSI identity, and use it to access Azure Cosmos DB

## Prerequisites

[!INCLUDE [msi-core-prereqs](~/includes/active-directory-msi-core-prereqs-ua.md)]

[!INCLUDE [msi-tut-prereqs](~/includes/active-directory-msi-tut-prereqs.md)]

To run the CLI script examples in this tutorial, you have two options:

- Use [Azure Cloud Shell](~/articles/cloud-shell/overview.md) either from the Azure portal, or via the **Try It** button, located in the top right corner of each code block.
- [Install the latest version of CLI 2.0](https://docs.microsoft.com/cli/azure/install-azure-cli) (2.0.23 or later) if you prefer to use a local CLI console.

## Sign in to Azure

Sign in to the Azure portal at [https://portal.azure.com](https://portal.azure.com).

## Create a Linux virtual machine in a new resource group

For this tutorial, we create a new Linux VM. You can also enable MSI on an existing VM.

1. Click the **+ Create a resource** found on the upper left-hand corner of the Azure portal.
2. Select **Compute**, and then select **Ubuntu Server 16.04 LTS VM**.
3. Enter the virtual machine information. For **Authentication type**, select **SSH public key** or **Password**. The created credentials allow you to log in to the VM.

![MSI Linux VM](~/articles/active-directory/media/msi-tutorial-linux-vm-access-arm/msi-linux-vm.png)

4. Choose a **Subscription** for the virtual machine in the dropdown.
5. Under **Resource Group**, choose **Create New** and type the name of the resource group for this VM. When complete, click **OK**.
6. Select the size for the VM. To see more sizes, select **View all** or change the Supported disk type filter. In the **Settings** blade, keep the defaults and click **OK**.

## Create a user-assigned MSI

1. If you are using the CLI console (instead of an Azure Cloud Shell session), start by signing in to Azure. Use an account that is associated with the Azure subscription under which you would like to create the new MSI:

```azurecli
az login
```

2. Create a user-assigned MSI using [az identity create](/cli/azure/identity#az_identity_create). The `-g` parameter specifies the resource group where the MSI is created, and the `-n` parameter specifies its name. Be sure to replace the `<RESOURCE GROUP>` and `<MSI NAME>` parameter values with your own values:

```azurecli-interactive
az identity create -g <RESOURCE GROUP> -n <MSI NAME>
```

The response contains details for the user-assigned MSI created, similar to the following example (note the `clientId` and `id` values for your MSI, as they are used in later steps):

```json
{
"clientId": "73444643-8088-4d70-9532-c3a0fdc190fz",
"clientSecretUrl": "https://control-westcentralus.identity.azure.net/subscriptions/<SUBSCRIPTON ID>/resourcegroups/<RESOURCE GROUP>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<MSI NAME>/credentials?tid=5678&oid=9012&aid=123444643-8088-4d70-9532-c3a0fdc190fz",
"id": "/subscriptions/<SUBSCRIPTON ID>/resourcegroups/<RESOURCE GROUP>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<MSI NAME>",
"location": "westcentralus",
"name": "<MSI NAME>",
"principalId": "c0833082-6cc3-4a26-a1b1-c4b5f90a981f",
"resourceGroup": "<RESOURCE GROUP>",
"tags": {},
"tenantId": "733a8f0e-ec41-4e69-8ad8-971fc4b533bl",
"type": "Microsoft.ManagedIdentity/userAssignedIdentities"
}
```

## Assign your user-assigned MSI to your Linux VM

Unlike a system-assigned MSI, a user-assigned MSI can be used by clients on multiple Azure resources. For this tutorial, you assign it to a single VM. You can also assign it to more than one VM.

Assign the user-assigned MSI to your Linux VM using [az vm assign-identity](/cli/azure/vm#az_vm_assign_identity). Be sure to replace the `<RESOURCE GROUP>` and `<VM NAME>` parameter values with your own values. Use the `id` property returned in the previous step for the `--identities` parameter value:

```azurecli-interactive
az vm assign-identity -g <RESOURCE GROUP> -n <VM NAME> --identities "/subscriptions/<SUBSCRIPTION ID>/resourcegroups/<RESOURCE GROUP>/providers/Microsoft.ManagedIdentity/userAssignedIdentities/<MSI NAME>"
```

## Create a Cosmos DB account

If you don't already have one, now create a Cosmos DB account. You can also skip this step and use an existing Cosmos DB account, if you prefer.

1. Click the **+/Create new service** button found on the upper left-hand corner of the Azure portal.
2. Click **Databases**, then **Azure Cosmos DB**, and a new "New account" panel displays.
3. Enter an **ID** for the Cosmos DB account, which you use later.
4. **API** should be set to "SQL." The approach described in this tutorial can be used with the other available API types, but the steps in this tutorial are for the SQL API.
5. Ensure the **Subscription** and **Resource Group** match the ones you specified when you created your VM in the previous step. Select a **Location** where Cosmos DB is available.
6. Click **Create**.

## Create a collection in the Cosmos DB account

Next, add a data collection in the Cosmos DB account that you can query in later steps.

1. Navigate to your newly created Cosmos DB account.
2. On the **Overview** tab click the **+/Add Collection** button, and an "Add Collection" panel slides out.
3. Give the collection a database ID, collection ID, select a storage capacity, enter a partition key, enter a throughput value, then click **OK**. For this tutorial, it is sufficient to use "Test" as the database ID and collection ID, select a fixed storage capacity and lowest throughput (400 RU/s).

## Grant your User Assigned MSI access to the Cosmos DB account access keys

Cosmos DB does not natively support Azure AD authentication. However, you can use an MSI to retrieve a Cosmos DB access key from the Resource Manager, then use the key to access Cosmos DB. In this step, you grant your user assigned MSI access to the keys to the Cosmos DB account.

First grant the MSI identity access to the Cosmos DB account in Azure Resource Manager using the Azure CLI. Update the values for `<SUBSCRIPTION ID>`, `<RESOURCE GROUP>`, and `<COSMOS DB ACCOUNT NAME>` for your environment. Replace `<MSI PRINCIPALID>` with the `principalId` property returned by the `az identity create` command in [Create a user-assigned MSI](#create-a-user-assigned-msi). Cosmos DB supports two levels of granularity when using access keys: read/write access to the account, and read-only access to the account. Assign the `DocumentDB Account Contributor` role if you want to get read/write keys for the account, or assign the `Cosmos DB Account Reader Role` role if you want to get read-only keys for the account:

```azurecli-interactive
az role assignment create --assignee <MSI PRINCIPALID> --role '<ROLE NAME>' --scope "/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP>/providers/Microsoft.DocumentDB/databaseAccounts/<COSMODS DB ACCOUNT NAME>"
```

The response includes the details for the role assignment created:

```
{
"id": "/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP>/providers/Microsoft.DocumentDB/databaseAccounts/<COSMOS DB ACCOUNT>/providers/Microsoft.Authorization/roleAssignments/5b44e628-394e-4e7b-bbc3-d6cd4f28f15b",
"name": "5b44e628-394e-4e7b-bbc3-d6cd4f28f15b",
"properties": {
"principalId": "c0833082-6cc3-4a26-a1b1-c4b5f90a981f",
"roleDefinitionId": "/subscriptions/<SUBSCRIPTION ID>/providers/Microsoft.Authorization/roleDefinitions/fbdf93bf-df7d-467e-a4d2-9458aa1360c8",
"scope": "/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP>/providers/Microsoft.DocumentDB/databaseAccounts/<COSMOS DB ACCOUNT>"
},
"resourceGroup": "<RESOURCE GROUP>",
"type": "Microsoft.Authorization/roleAssignments"
}
```

## Get an access token using the User Assigned MSI and use it to call Azure Resource Manager

For the remainder of the tutorial, work from the VM created earlier.

To complete these steps, you need an SSH client. If you are using Windows, you can use the SSH client in the [Windows Subsystem for Linux](https://msdn.microsoft.com/commandline/wsl/install_guide). If you need assistance configuring your SSH client's keys, see [How to Use SSH keys with Windows on Azure](../../virtual-machines/linux/ssh-from-windows.md), or [How to create and use an SSH public and private key pair for Linux VMs in Azure](../../virtual-machines/linux/mac-create-ssh-keys.md).

1. In the Azure portal, navigate to **Virtual Machines**, go to your Linux virtual machine, then from the **Overview** page click **Connect** at the top. Copy the string to connect to your VM.
2. Connect to your VM using your SSH client.
3. Next, you are prompted to enter in your **Password** you added when creating the **Linux VM**. You should then be successfully signed in.
4. Use CURL to get an access token for Azure Resource Manager.

The CURL request and response for the access token is below. Replace <CLIENT ID> with the clientId value of your user assigned MSI:

```bash
curl 'http://localhost:50342/oauth2/token?resource=https://management.azure.com/&client_id=<CLIENT ID>' -H "Metadata:true"
```

> [!NOTE]
> In the previous request, the value of the "resource" parameter must be an exact match for what is expected by Azure AD. When using the Azure Resource Manager resource ID, you must include the trailing slash on the URI.
> In the following response, the access_token element as been shortened for brevity.

```bash
{"access_token":"eyJ0eXAiOi...",
"expires_in":"3599",
"expires_on":"1518503375",
"not_before":"1518499475",
"resource":"https://management.azure.com/",
"token_type":"Bearer",
"client_id":"1ef89848-e14b-465f-8780-bf541d325cd5"}
```

## Get access keys from Azure Resource Manager to make Cosmos DB calls

Now use CURL to call Resource Manager using the access token we retrieved in the previous section, to retrieve the Cosmos DB account access key. Once we have the access key, we can query Cosmos DB. Be sure to replace the `<SUBSCRIPTION ID>`, `<RESOURCE GROUP>`, and `<COSMOS DB ACCOUNT NAME>` parameter values with your own values. Replace the `<ACCESS TOKEN>` value with the access token you retrieved earlier. If you want to retrieve read/write keys, use key operation type `listKeys`. If you want to retrieve read-only keys, use the key operation type `readonlykeys`:

```bash
curl 'https://management.azure.com/subscriptions/<SUBSCRIPTION ID>/resourceGroups/<RESOURCE GROUP>/providers/Microsoft.DocumentDB/databaseAccounts/<COSMOS DB ACCOUNT NAME>/<KEY OPERATION TYPE>?api-version=2016-03-31' -X POST -d "" -H "Authorization: Bearer <ACCESS TOKEN>"
```

> [!NOTE]
> The text in the prior URL is case-sensitive, so ensure if you are using upper-lowercase for your Resource Groups to reflect it accordingly. Additionally, it’s important to know that this is a POST request not a GET request and ensure you pass a value to capture a length limit with -d that can be NULL.

The CURL response gives you the list of Keys. For example, if you get the read-only keys:

```bash
{"primaryReadonlyMasterKey":"bWpDxS...dzQ==",
"secondaryReadonlyMasterKey":"38v5ns...7bA=="}
```

Now that you have the access key for the Cosmos DB account you can pass it to a Cosmos DB SDK and make calls to access the account. For a quick example, you can pass the access key to the Azure CLI. You can get the <COSMOS DB CONNECTION URL> from the **Overview** tab on the Cosmos DB account blade in the Azure portal. Replace the <ACCESS KEY> with the value you obtained above:

```bash
az cosmosdb collection show -c <COLLECTION ID> -d <DATABASE ID> --url-connection "<COSMOS DB CONNECTION URL>" --key <ACCESS KEY>
```

This CLI command returns details about the collection:

```bash
{
"collection": {
"_conflicts": "conflicts/",
"_docs": "docs/",
"_etag": "\"00006700-0000-0000-0000-5a8271e90000\"",
"_rid": "Es5SAM2FDwA=",
"_self": "dbs/Es5SAA==/colls/Es5SAM2FDwA=/",
"_sprocs": "sprocs/",
"_triggers": "triggers/",
"_ts": 1518498281,
"_udfs": "udfs/",
"id": "Test",
"indexingPolicy": {
"automatic": true,
"excludedPaths": [],
"includedPaths": [
{
"indexes": [
{
"dataType": "Number",
"kind": "Range",
"precision": -1
},
{
"dataType": "String",
"kind": "Range",
"precision": -1
},
{
"dataType": "Point",
"kind": "Spatial"
}
],
"path": "/*"
}
],
"indexingMode": "consistent"
}
},
"offer": {
"_etag": "\"00006800-0000-0000-0000-5a8271ea0000\"",
"_rid": "f4V+",
"_self": "offers/f4V+/",
"_ts": 1518498282,
"content": {
"offerIsRUPerMinuteThroughputEnabled": false,
"offerThroughput": 400
},
"id": "f4V+",
"offerResourceId": "Es5SAM2FDwA=",
"offerType": "Invalid",
"offerVersion": "V2",
"resource": "dbs/Es5SAA==/colls/Es5SAM2FDwA=/"
}
}
```

## Next steps

- For an overview of MSI, see [Managed Service Identity (MSI) for Azure resources](msi-overview.md).

Use the following comments section to provide feedback and help us refine and shape our content.
39 changes: 11 additions & 28 deletions articles/api-management/api-management-modify-content-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are three fundamental ways to customize the developer portal in Azure API

* [Edit the contents of static pages and page layout elements][modify-content-layout] (explained in this guide)
* [Update the styles used for page elements across the developer portal][customize-styles]
* [Modify the templates used for pages generated by the portal][portal-templates] (e.g. API docs, products, user authentication, etc.)
* [Modify the templates used for pages generated by the portal][portal-templates] (for example, API docs, products, user authentication, etc.)

## <a name="page-structure"> </a>Structure of developer portal pages

Expand All @@ -32,43 +32,26 @@ The developer portal is based on a content management system. The layout of ever

All widgets are editable.
* The core contents specific to each individual page reside in the "Contents" widget. Editing a page means editing the contents of this widget.
* All page layout elements are contained with the remaining widgets. Changes made to these widgets will apply to all pages. They will be referred to as "layout widgets".
* All page layout elements are contained with the remaining widgets. Changes made to these widgets are applied to all pages. They are referred to as "layout widgets."

In day-to-day page editing one usually only modifies the Content widget which will have different content for each individual page.
In day-to-day page editing one would often modify just the Content widget, which will have different content for each individual page.

## <a name="modify-layout-widget"> </a>Modifying the contents of a layout widget

Content within the developer portal is modified via the publisher portal which is accessible from the Azure Portal. To reach it, click **Publisher portal** from the service toolbar of your API Management instance.
The Developer portal is accessible from the Azure Portal.

![Publisher portal][api-management-management-console]

To edit the contents of that widget, click **Widgets** from the **Developer Portal** menu on the left. For this example lets modify the contents of the Header widget. Select the **Header** widget from the list.

![Widgets header][api-management-widgets-header]

The contents of the header is editable from within the **Body** field. Change the text as desired and then click **Save** at the bottom of the page.
1. Click **Developer Portal** from the toolbar of your API Management instance.
2. To edit the contents of widgets, click the icon comprised of two paint brushes from the **Developer** portal menu on the left.
3. To modify the contents of the header, scroll to the **Header** section in the list on the left.

The widgets are editable from within the fields.
4. Once you are ready to publish your changes, click **Publish** at the bottom of the page.

Now you should be able to see the new header on every page within the developer portal.

> To open the developer portal while in the publisher portal, click **Developer portal** in the top bar.
>
>

## <a name="edit-page-contents"> </a>Edit the contents of a page

To see the list of all existing content pages, click **Content** from the **Developer portal** menu in the publisher portal.

![Manage content][api-management-customization-manage-content]

Click the **Welcome** page to edit what is displayed on the home page of the developer portal. Make the changes you want, preview them if necessary, and then click **Publish Now** to make them visible to everyone.

> The home page uses a special layout that allows it to display a banner at the top. This banner is not editable from the **Content** section. To edit this banner, click **Widgets** from the **Developer portal** menu, select **Home page** from the **Current Layer** drop-down list, and then open the **Banner** item under the **Featured section**. The contents of this widget are editable just like any other page.
>
>

## <a name="next-steps"> </a>Next steps
* [Update the styles used for page elements across the developer portal][customize-styles]
* [Modify the templates used for pages generated by the portal][portal-templates] (e.g. API docs, products, user authentication, etc.)
* [Modify the templates used for pages generated by the portal][portal-templates] (for example, API docs, products, user authentication, etc.)

[Structure of developer portal pages]: #page-structure
[Modifying the contents of a layout widget]: #modify-layout-widget
Expand Down
Loading