Skip to content

Commit a39cebd

Browse files
authored
Merge pull request #103221 from KingdomOfEnds/adt-aad
ADT AAD
2 parents cb0f9d3 + b43d98d commit a39cebd

12 files changed

+39
-53
lines changed

articles/digital-twins/how-to-configure-postman.md

Lines changed: 6 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: bertvanhoof
77
ms.service: digital-twins
88
services: digital-twins
99
ms.topic: conceptual
10-
ms.date: 01/10/2020
10+
ms.date: 02/03/2020
1111
---
1212

1313
# How to configure Postman for Azure Digital Twins
@@ -28,45 +28,15 @@ Through the Postman client, solutions developers can specify the kind of HTTP re
2828

2929
## Configure Azure Active Directory to use the OAuth 2.0 implicit grant flow
3030

31-
Configure your Azure Active Directory app to use the OAuth 2.0 implicit grant flow.
32-
33-
1. Open the **API permissions** pane for your app registration. Select **Add a permission** button. In the **Request API permissions** pane, select the **APIs my organization uses** tab, and then search for:
34-
35-
1. `Azure Digital Twins`. Select the **Azure Digital Twins** API.
36-
37-
[![Search API or Azure Digital Twins](../../includes/media/digital-twins-permissions/aad-aap-search-api-dt.png)](../../includes/media/digital-twins-permissions/aad-aap-search-api-dt.png#lightbox)
38-
39-
1. Alternatively, search for `Azure Smart Spaces Service`. Select the **Azure Smart Spaces Service** API.
40-
41-
[![Search API for Azure Smart Spaces](../../includes/media/digital-twins-permissions/aad-app-search-api.png)](../../includes/media/digital-twins-permissions/aad-app-search-api.png#lightbox)
42-
43-
> [!IMPORTANT]
44-
> The Azure AD API name and ID that will appear depends on your tenant:
45-
> * Test tenant and customer accounts should search for `Azure Digital Twins`.
46-
> * Other Microsoft accounts should search for `Azure Smart Spaces Service`.
47-
48-
1. The selected API shows up as **Azure Digital Twins** in the same **Request API permissions** pane. Select the **Read (1)** drop down, and then select **Read.Write** checkbox. Select the **Add permissions** button.
49-
50-
[![Add API permissions for Azure Digital Twins](../../includes/media/digital-twins-permissions/aad-app-req-permissions.png)](../../includes/media/digital-twins-permissions/aad-app-req-permissions.png#lightbox)
51-
52-
1. Depending on your organization's settings, you might need to take additional steps to grant admin access to this API. Contact your administrator for more information. Once the admin access is approved, the **ADMIN CONSENT REQUIRED** column in the **API permissions** pane will show similar to the following for your APIs:
53-
54-
[![Configure admin consent approval](../../includes/media/digital-twins-permissions/aad-app-admin-consent.png)](../../includes/media/digital-twins-permissions/aad-app-admin-consent.png#lightbox)
55-
56-
1. Configure a second **Redirect URI** to `https://www.getpostman.com/oauth2/callback`.
31+
1. Follow the steps in [the Quickstart](quickstart-view-occupancy-dotnet.md#set-permissions-for-your-app) to create and configure an Azure Active Directory application. Alternatively, you can reuse an existing app registration.
5732

5833
[![Configure a new Postman Redirect URI](media/how-to-configure-postman/authentication-redirect-uri.png)](media/how-to-configure-postman/authentication-redirect-uri.png#lightbox)
5934

60-
1. To make sure that [the app is registered as a **public client**](https://docs.microsoft.com/azure/active-directory/develop/scenario-desktop-app-registration), open the **Authentication** pane for your app registration, and scroll down in that pane. In the **Default client type** section, choose **Yes** for **Treat application as a public client**, and hit **Save**.
61-
62-
Check **Access tokens** to enable the **oauth2AllowImplicitFlow** setting in your Manifest.json.
35+
1. Now, add a **Redirect URI** to `https://www.getpostman.com/oauth2/callback`.
6336

64-
[![Public client configuration setting](../../includes/media/digital-twins-permissions/aad-configure-public-client.png)](../../includes/media/digital-twins-permissions/aad-configure-public-client.png#lightbox)
65-
66-
1. Copy and keep the **Application ID** of your Azure Active Directory app. It's used in the steps that follow.
67-
68-
[![Azure Active Directory application ID](../../includes/media/digital-twins-permissions/aad-app-reg-app-id.png)](../../includes/media//digital-twins-permissions/aad-app-reg-app-id.png#lightbox)
37+
1. Select the **Implicit grant** > **Access tokens** check box to allow the OAuth 2.0 implicit grant flow to be used. Select **Configure**, then **Save**.
6938

39+
1. Copy the **Client ID** of your Azure Active Directory app.
7040

7141
## Obtain an OAuth 2.0 token
7242

@@ -86,15 +56,13 @@ Set up and configure Postman to obtain an Azure Active Directory token. Afterwar
8656
8757
1. Go to [www.getpostman.com](https://www.getpostman.com/) to download the app.
8858
89-
1. Open the Postman app and click new | Create new, and select Request. Enter a Request name. Select a collection or folder to save it to, and click Save.
90-
9159
1. We want to make GET request. Select the **Authorization** tab, select OAuth 2.0, and then select **Get New Access Token**.
9260
9361
| Field | Value |
9462
|---------|---------|
9563
| Grant Type | `Implicit` |
9664
| Callback URL | `https://www.getpostman.com/oauth2/callback` |
97-
| Auth URL | Use the **Authorization URL** from **step 2** |
65+
| Auth URL | Use the **Authorization URL** from **step 1** |
9866
| Client ID | Use the **Application ID** for the Azure Active Directory app that was created or reused from the previous section |
9967
| Scope | Leave blank |
10068
| State | Leave blank |

articles/digital-twins/how-to-use-swagger.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ manager: bertvanhoof
77
ms.service: digital-twins
88
services: digital-twins
99
ms.topic: conceptual
10-
ms.date: 01/21/2020
10+
ms.date: 02/03/2020
1111
ms.custom: seodec18
1212
---
1313

@@ -88,11 +88,11 @@ The examples also include error codes to help debug or improve failing tests.
8888
## Swagger OAuth 2.0 authorization
8989

9090
> [!NOTE]
91-
> * The user principal that created the Azure Digital Twins resource will have a Space Administrator role assignment and will be able to create additional role assignments for other users. Such users and their roles can be authorized to call the APIs.
91+
> * The user principal that created the Azure Digital Twins resource will have a Space Administrator role assignment and will be able to create additional role assignments for other users. Those users and their roles can be authorized to call the APIs.
9292
93-
1. Follow the steps in [this quickstart](https://docs.microsoft.com/azure/active-directory/develop/quickstart-v1-integrate-apps-with-azure-ad) to create and configure an Azure AD application. Alternatively, you can reuse an existing app registration.
93+
1. Follow the steps in [the Quickstart](quickstart-view-occupancy-dotnet.md#set-permissions-for-your-app) to create and configure an Azure Active Directory application. Alternatively, you can reuse an existing app registration.
9494

95-
1. Add the following **Redirect url** to your Azure AD app registration:
95+
1. Add the following **Redirect URI** to your Azure Active Directory app registration:
9696

9797
[![Register Swagger redirect url in AAD](media/how-to-use-swagger/swagger-aad-redirect-url-registration.png)](media/how-to-use-swagger/swagger-aad-redirect-url-registration.png#lightbox)
9898

@@ -103,7 +103,9 @@ The examples also include error codes to help debug or improve failing tests.
103103
|---------|---------|---------|
104104
| YOUR_SWAGGER_URL | Your Management REST API documentation URL found in the portal | `https://yourDigitalTwinsName.yourLocation.azuresmartspaces.net/management/swagger` |
105105
106-
1. Copy the **Client ID** of your Azure AD app.
106+
1. Select the **Implicit grant** > **Access tokens** check box to allow the OAuth 2.0 implicit grant flow to be used. Select **Configure**, then **Save**.
107+
108+
1. Copy the **Client ID** of your Azure Active Directory app.
107109
108110
After completing the Azure Active Directory registration:
109111
254 KB
Loading
110 KB
Loading

includes/digital-twins-permissions.md

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
manager: bertvanhoof
88
ms.service: digital-twins
99
ms.topic: include
10-
ms.date: 01/23/2020
10+
ms.date: 02/03/2020
1111
ms.custom: include file
1212
---
1313

@@ -22,24 +22,40 @@
2222

2323
[![Select the New registration button](./media/digital-twins-permissions/aad-app-register.png)](./media/digital-twins-permissions/aad-app-register.png#lightbox)
2424

25-
1. Give a friendly name for this app registration in the **Name** box. Under the **Redirect URI (optional)** section, choose **Public client/native (mobile & desktop)** in the drop-down menu on the left, and enter `https://microsoft.com` in the textbox on the right. Select **Register**.
25+
1. Give a friendly name for this app registration in the **Name** box.
26+
27+
1. Under **Redirect URI (optional)** section, enter `https://microsoft.com` in the textbox.
28+
29+
1. Verify which accounts and tenants are supported by your Azure Active Directory app.
30+
31+
1. Select **Register**.
2632

2733
[![Create pane](./media/digital-twins-permissions/aad-app-reg-create.png)](./media/digital-twins-permissions/aad-app-reg-create.png#lightbox)
2834

29-
1. To make sure that [the app is registered as a **public client**](https://docs.microsoft.com/azure/active-directory/develop/scenario-desktop-app-registration), open the **Authentication** pane for your app registration, and scroll down in that pane. In the **Default client type** section, choose **Yes** for **Treat application as a public client**, and hit **Save**.
35+
1. The **Authentication** blade specifies important authentication configuration settings.
3036

31-
1. **Redirect URIs** must match the address supplied by the authentication request:
37+
1. Add **Redirect URIs** and configure **Access Tokens** by selecting **+ Add a platform**.
38+
39+
1. Select **Yes** to specify that the app is a **public client**.
3240

33-
* For apps hosted in a local development environment, select **Public client (mobile & desktop)**. Make sure to set the **Default client type** to yes.
34-
* For Single-Page apps hosted on Azure App Service, select **Web**.
41+
1. Verify which accounts and tenants are supported by your Azure Active Directory app.
42+
43+
[![Public client configuration setting](./media/digital-twins-permissions/aad-configure-public-client.png)](./media/digital-twins-permissions/aad-configure-public-client.png#lightbox)
44+
45+
1. After selecting the appropriate platform, configure your **Redirect URIs** and **Access Tokens** in the side panel to the right of the user interface.
46+
47+
1. **Redirect URIs** must match the address supplied by the authentication request:
3548

36-
Select **Public client (mobile & desktop)** and enter `http://localhost:8080/`.
49+
* For apps hosted in a local development environment, select **Public client (mobile & desktop)**. Make sure to set **public client** to **Yes**.
50+
* For Single-Page Apps hosted on Azure App Service, select **Web**.
3751

38-
[![Configure Redirect URIs](./media/digital-twins-permissions/aad-app-configure-redirect-uris.png)](./media/digital-twins-permissions/aad-app-configure-redirect-uris.png#lightbox)
52+
1. Determine whether a **Logout URL** is appropriate.
3953

40-
1. Check **Access tokens** to configure the **oauth2AllowImplicitFlow** setting to `true` in your resource's **Manifest** JSON.
54+
1. Enable the implicit grant flow by checking **Access tokens** or **ID tokens**.
55+
56+
[![Configure Redirect URIs](./media/digital-twins-permissions/aad-app-configure-redirect-uris.png)](./media/digital-twins-permissions/aad-app-configure-redirect-uris.png#lightbox)
4157

42-
[![Public client configuration setting](./media/digital-twins-permissions/aad-configure-public-client.png)](./media/digital-twins-permissions/aad-configure-public-client.png#lightbox)
58+
Click **Configure**, then **Save**.
4359

4460
1. Open the **Overview** pane of your registered app, and copy the values of the following entities to a temporary file. You'll use these values to configure your sample application in the following sections.
4561

74.6 KB
Loading
67.1 KB
Loading
-85.3 KB
Loading
75.1 KB
Loading
-2.5 KB
Loading

0 commit comments

Comments
 (0)