Skip to content

Commit ba60b8f

Browse files
authored
Merge pull request #107780 from Juliako/accessapi
Accessapi
2 parents 6b1b485 + 81d0baa commit ba60b8f

File tree

6 files changed

+42
-85
lines changed

6 files changed

+42
-85
lines changed

.openpublishing.redirection.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49364,6 +49364,16 @@
4936449364
"redirect_url": "/azure/cognitive-services/speech-service",
4936549365
"redirect_document_id": false
4936649366
},
49367+
{
49368+
"source_path": "articles/media-services/latest/access-api-portal.md",
49369+
"redirect_url": "/azure/media-services/latest/access-api-howto",
49370+
"redirect_document_id": false
49371+
},
49372+
{
49373+
"source_path": "articles/media-services/latest/access-api-cli-how-to.md",
49374+
"redirect_url": "/azure/media-services/latest/access-api-howto",
49375+
"redirect_document_id": false
49376+
},
4936749377
{
4936849378
"source_path": "articles/media-services/latest/create-account-portal.md",
4936949379
"redirect_url": "/azure/media-services/latest/create-account-howto",

articles/media-services/latest/TOC.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,9 @@
206206
displayName: portal, cli, storage
207207
- name: Reset the account credentials
208208
href: cli-reset-account-credentials.md
209-
- name: Access APIs
210-
items:
211-
- name: With portal
212-
href: access-api-portal.md
213-
- name: With CLI
214-
href: access-api-cli-how-to.md
209+
- name: Access API
210+
displayName: portal, cli
211+
href: access-api-howto.md
215212
- name: Scale Media Reserved Units
216213
href: media-reserved-units-cli-how-to.md
217214
- name: Create an Asset

articles/media-services/latest/access-api-cli-how-to.md

Lines changed: 0 additions & 62 deletions
This file was deleted.
Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
title: Get started with Azure AD authentication by using the Azure portal
3-
description: Learn how to use the Azure portal to access Azure Active Directory (Azure AD) authentication to consume the Azure Media Services API.
2+
title: Get started with Azure AD authentication
3+
description: Learn how to access Azure Active Directory (Azure AD) authentication to consume the Azure Media Services API.
44
services: media-services
55
documentationcenter: ''
66
author: Juliako
@@ -12,53 +12,65 @@ ms.workload: media
1212
ms.tgt_pltfrm: na
1313
ms.devlang: na
1414
ms.topic: how-to
15-
ms.date: 03/09/2020
15+
ms.date: 03/15/2020
1616
ms.author: juliako
1717
---
18-
# Use the Azure portal to get credentials to access Media Services API
18+
# Get credentials to access Media Services API
1919

2020
When you use Azure AD authentication to access the Azure Media Services API, you have two authentication options:
2121

22-
- **Service principal authentication**. Authenticate a service. Applications that commonly use this authentication method are apps that run daemon services, middle-tier services, or scheduled jobs: web apps, function apps, logic apps, APIs, or a microservice.
23-
- **User authentication**. Authenticate a person who is using the app to interact with Media Services resources. The interactive application should first prompt the user for credentials. An example is a management console app used by authorized users to monitor encoding jobs or live streaming.
22+
- **Service principal authentication** (recommended)
2423

25-
This article shows you how to use the Azure portal to get credentials to access Media Services API.
24+
Authenticate a service. Applications that commonly use this authentication method are apps that run daemon services, middle-tier services, or scheduled jobs: web apps, function apps, logic apps, APIs, or a microservice.
25+
- **User authentication**
26+
27+
Authenticate a person who is using the app to interact with Media Services resources. The interactive application should first prompt the user for credentials. An example is a management console app used by authorized users to monitor encoding jobs or live streaming.
28+
29+
This article describes steps for getting credentials to access Media Services API. Choose from the following tabs.
2630

2731
## Prerequisites
2832

2933
- An Azure account. If you don't have an account, start with an [Azure free trial](https://azure.microsoft.com/pricing/free-trial/).
30-
- A Media Services account. For more information, see [Create an Azure Media Services account by using the Azure portal](create-account-portal.md).
34+
- A Media Services account. For more information, see [Create an Azure Media Services account by using the Azure portal](create-account-howto.md).
3135

32-
## API access
36+
## The Azure portal
37+
38+
### API access
3339

3440
The **API access** page lets you select the authentication method you want to use to connect to the API. The page also provides the values you need to connect to the API.
3541

3642
1. In the [Azure portal](https://portal.azure.com/), select your Media Services account.
3743
2. Select how to connect to the Media Services API.
3844
3. Under **Connect to Media Services API**, select the Media Services API version you want to connect to (V3 is the latest version of the service).
3945

40-
## Service principal authentication (recommended)
46+
### Service principal authentication (recommended)
4147

4248
Authenticates a service using an Azure Active Directory (Azure AD) app and secret. This is recommended for any middle-tier services calling to the Media Services API. Examples are Web Apps, Functions, Logic Apps, APIs, and microservices. This is the recommended authentication method.
4349

44-
### Manage your Azure AD app and secret
50+
#### Manage your Azure AD app and secret
4551

4652
The **Manage your AAD app and secret** section lets you select or create a new Azure AD app and generate a secret. For security purposes, the secret cannot be shown after the blade is closed. The application uses the application ID and secret for authentication to obtain a valid token for media services.
4753

4854
Make sure that you have sufficient permissions to register an application with your Azure AD tenant and to assign the application to a role in your Azure subscription. For more information, see [Required permissions](https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal#required-permissions).
4955

50-
### Connect to Media Services API
56+
#### Connect to Media Services API
5157

5258
The **Connect to Media Services API** provides you with values that you use to connect your service principal application. You can get text values or copy the JSON or XML blocks.
5359

54-
## User authentication
60+
### User authentication
5561

5662
This option could be used to authenticate an employee or member of an Azure Active Directory who is using an app to interact with Media Services resources. The interactive application should first prompt the user for the user's credentials. This authentication method should only be used for Management applications.
5763

58-
### Connect to Media Services API
64+
#### Connect to Media Services API
5965

6066
Copy your credentials to connect your user application from the **Connect to Media Services API** section. You can get text values or copy the JSON or XML blocks.
6167

68+
[!INCLUDE [media-services-cli-instructions](../../../includes/media-services-cli-instructions.md)]
69+
70+
[!INCLUDE [media-services-v3-cli-access-api-include](../../../includes/media-services-v3-cli-access-api-include.md)]
71+
72+
---
73+
6274
## Next steps
6375

6476
[Tutorial: Upload, encode, and stream videos with Media Services v3](stream-files-tutorial-with-api.md).

includes/media-services-cli-instructions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.author: juliako
1010
ms.custom: include file
1111
---
1212

13-
## CLI Shell
13+
## Use CLI Shell
1414

1515
It is recommended to use [Azure Cloud Shell](https://docs.microsoft.com/azure/cloud-shell/overview?view=azure-cli-latest) to execute CLI commands. **Cloud Shell** is a free, interactive shell that you can use to run the steps in this article. Common Azure tools are preinstalled and configured in Cloud Shell for you to use with your account. It provides the flexibility of choosing the shell experience that best suits the way you work. Linux users can opt for a Bash experience, while Windows users can opt for PowerShell.
1616

@@ -38,7 +38,7 @@ Relative path to the file (all OS)
3838
Absolute file path on Linux/Mac and Windows OS
3939

4040
* `@ "/usr/home/mytestfile.json"`
41-
* `@"c:\tmp\user\mytestfile.json"`
41+
* `@"c:\tmp\user\mytestfile.json"`
4242

4343
Use `{file}` if the command is asking for a path to the file. For example, `az ams transform create -a amsaccount -g resourceGroup -n custom --preset .\customPreset.json`. <br/>
4444
Use `@{file}` if the command is going to load the specified file. For example, `az ams account-filter create -a amsaccount -g resourceGroup -n filterName --tracks @tracks.json`.

includes/media-services-v3-cli-access-api-include.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.author: juliako
1010
ms.custom: include file
1111
---
1212

13-
## Access the Media Services API
13+
### Access the Media Services API
1414

1515
To connect to Azure Media Services APIs, you use the Azure AD service principal authentication. The following command creates an Azure AD application and attaches a service principal to the account. You should use the returned values to configure your application.
1616

0 commit comments

Comments
 (0)