You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/spatial-anchors/concepts/anchor-relationships-way-finding.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
---
2
-
title: Anchor relationships and way-finding in Azure Spatial Anchors | Microsoft Docs
3
-
description: Learn about the conceptual model behind anchor relationships. Learn to connect anchors within a space and to use the Nearby API to fulfill a way-finding scenario.
2
+
title: Anchor relationships and way-finding
3
+
description: Learn about the conceptual model behind anchor relationships. Learn to connect anchors within a space and to use the Nearby API to fulfill a way-finding scenario.
4
4
author: ramonarguelles
5
-
manager: vicenterivera
5
+
manager: vriveras
6
6
services: azure-spatial-anchors
7
7
8
8
ms.author: rgarcia
@@ -55,11 +55,11 @@ To connect anchors:
55
55
56
56
### Connect anchors in multiple sessions
57
57
58
-
You can connect spatial anchors over multiple sessions. Using this method, you can create and connect some anchors at one time and then later create and connect more anchors.
58
+
You can connect spatial anchors over multiple sessions. Using this method, you can create and connect some anchors at one time and then later create and connect more anchors.
59
59
60
60
To connect anchors over multiple sessions:
61
61
62
-
1. The app creates some anchors in one CloudSpatialAnchorSession.
62
+
1. The app creates some anchors in one CloudSpatialAnchorSession.
63
63
2. At a different time, the app locates one of these anchors (for example, Anchor A) by using a new CloudSpatialAnchorSession.
64
64
3. Walk to a new location. The underlying mixed-reality or augmented-reality platform tracks the movement.
65
65
4. Create Anchor C by using the same CloudSpatialAnchorSession. Anchors A, B, and C are now connected. The Spatial Anchors service maintains this relationship.
@@ -68,7 +68,7 @@ You can continue this procedure for more anchors and more sessions over time.
68
68
69
69
### Verify anchor connections
70
70
71
-
The app can verify that two anchors are connected by issuing a query for nearby anchors. When the query's result contains the target anchor, the anchor connection is verified. If the anchors aren't connected, the app can try to connect them again.
71
+
The app can verify that two anchors are connected by issuing a query for nearby anchors. When the query's result contains the target anchor, the anchor connection is verified. If the anchors aren't connected, the app can try to connect them again.
72
72
73
73
Here are some reasons why anchors might fail to connect:
Copy file name to clipboardExpand all lines: articles/spatial-anchors/concepts/authentication.md
+22-22Lines changed: 22 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Authentication and authorization to Azure Spatial Anchors | Microsoft Docs
3
-
description: Learn about the various ways an app or service can authenticate to Azure Spatial Anchors, and the levels of control that you have to gate access to Azure Spatial Anchors.
2
+
title: Authentication and authorization
3
+
description: Learn about the various ways an app or service can authenticate to Azure Spatial Anchors, and the levels of control that you have to gate access to Azure Spatial Anchors.
# Authentication and authorization to Azure Spatial Anchors
14
14
15
-
In this section, we will cover the various ways you can authenticate to Azure Spatial Anchors from your app or web service, and the ways in which you can use Role-Based Access Control in Azure Directory (Azure AD) to control access to your Spatial Anchors accounts.
15
+
In this section, we will cover the various ways you can authenticate to Azure Spatial Anchors from your app or web service, and the ways in which you can use Role-Based Access Control in Azure Directory (Azure AD) to control access to your Spatial Anchors accounts.
16
16
17
17
## Overview
18
18
19
19

20
20
21
-
To access a given Azure Spatial Anchors account, clients need to first obtain an access token from Azure Mixed Reality Security Token Service (STS). Tokens obtained from STS live for 24 hours, and contain information for the Spatial Anchors services to make authorization decisions on the account, and ensure that only authorized principals can access that account.
21
+
To access a given Azure Spatial Anchors account, clients need to first obtain an access token from Azure Mixed Reality Security Token Service (STS). Tokens obtained from STS live for 24 hours, and contain information for the Spatial Anchors services to make authorization decisions on the account, and ensure that only authorized principals can access that account.
22
22
23
-
Access tokens can be obtained in exchange from either account keys, or from Azure AD-issued tokens.
23
+
Access tokens can be obtained in exchange from either account keys, or from Azure AD-issued tokens.
24
24
25
-
Account keys enable you to get quickly started on using the Azure Spatial Anchors service; however, before you deploy your application to production, it is advised that you update your app to use Azure AD-based authentication.
25
+
Account keys enable you to get quickly started on using the Azure Spatial Anchors service; however, before you deploy your application to production, it is advised that you update your app to use Azure AD-based authentication.
26
26
27
27
Azure AD authentication tokens can be obtained two ways:
28
28
29
-
- If you are building an enterprise application, and your company is using Azure AD as its identity system, you may use user-based Azure AD authentication in your app, and grant access to your spatial anchors accounts using your existing Azure AD security groups, or directly to users in your organization.
30
-
- Otherwise, it is recommended that you obtain Azure AD tokens from a web service supporting your app. Using a supporting web service is the recommended method of authentication for production applications, as it avoids embedding the credentials for accessing Azure Spatial Anchors in your client application.
29
+
- If you are building an enterprise application, and your company is using Azure AD as its identity system, you may use user-based Azure AD authentication in your app, and grant access to your spatial anchors accounts using your existing Azure AD security groups, or directly to users in your organization.
30
+
- Otherwise, it is recommended that you obtain Azure AD tokens from a web service supporting your app. Using a supporting web service is the recommended method of authentication for production applications, as it avoids embedding the credentials for accessing Azure Spatial Anchors in your client application.
31
31
32
32
## Account keys
33
33
@@ -36,9 +36,9 @@ Using account keys for access to your Azure Spatial Anchors account is the simpl
36
36

37
37
38
38
39
-
Two keys are made available, which are both simultaneously valid for access to the Spatial Anchors account. It is recommended that you regularly update the key you use to access the account; having two separate valid keys enable such updates without downtime; you only have to update alternatively the primary key and the secondary key.
39
+
Two keys are made available, which are both simultaneously valid for access to the Spatial Anchors account. It is recommended that you regularly update the key you use to access the account; having two separate valid keys enable such updates without downtime; you only have to update alternatively the primary key and the secondary key.
40
40
41
-
The SDK has built-in support for authenticating with account keys; you simply need to set the AccountKey property on your cloudSession object.
41
+
The SDK has built-in support for authenticating with account keys; you simply need to set the AccountKey property on your cloudSession object.
Once that is done, the SDK will handle the exchange of the account key for an access token, and the necessary caching of tokens for your app.
83
+
Once that is done, the SDK will handle the exchange of the account key for an access token, and the necessary caching of tokens for your app.
84
84
85
-
> [!WARNING]
85
+
> [!WARNING]
86
86
> Use of account keys is recommended for quick on-boarding, but during development/prototyping only. It is strongly recommended not to ship your application to production using an embedded account key in it, and to instead use the user-based or service-based Azure AD authentication approaches listed next.
87
87
88
88
## Azure AD user authentication
89
89
90
90
For applications targeting Azure Active Directory users, the recommended approach is to use an Azure AD token for the user, which you can obtain using the ADAL library as described in the following documentation: [https://docs.microsoft.com/azure/active-directory/develop/v1-overview](../../active-directory/develop/v1-overview.md); you should follow the steps listed under “Quick starts”, which include:
91
91
92
92
1. Configuration in Azure portal
93
-
1. Register your application in Azure AD as **Native application**. As part of registering, you will need to determine whether your application should be multi-tenant or not, and provide the redirect URLs allowed for your application.
94
-
2. Grant your application or users access to your resource:
93
+
1. Register your application in Azure AD as **Native application**. As part of registering, you will need to determine whether your application should be multi-tenant or not, and provide the redirect URLs allowed for your application.
94
+
2. Grant your application or users access to your resource:
95
95
1. Navigate to your Spatial Anchors resource in Azure portal
96
96
2. Switch to the **Access control (IAM)** tab
97
97
3. Hit **Add role assignment**
98
98
1. [Select a role](#role-based-access-control)
99
-
2. In the **Select** field, enter the name of the user(s), group(s), and/or application(s) to which you want to assign access.
99
+
2. In the **Select** field, enter the name of the user(s), group(s), and/or application(s) to which you want to assign access.
100
100
3. Hit **Save**.
101
101
2. In your code:
102
102
1. Make sure to use the **application ID** and **redirect Uri** of your own Azure AD application as the **client ID** and **RedirectUri** parameters in ADAL
103
103
2. Set the tenant information:
104
104
1. If your application supports **My organization only**, replace this value with your **Tenant ID** or **Tenant name** (for example, contoso.microsoft.com)
105
105
2. If your application supports **Accounts in any organizational directory**, replace this value with **Organizations**
106
106
3. If your application supports **All Microsoft account users**, replace this value with **Common**
107
-
3. On your token request, set the **resource** to "https://sts.mixedreality.azure.com". This "resource" will indicate to Azure AD that your application is requesting a token for the Azure Spatial Anchors service.
107
+
3. On your token request, set the **resource** to "https://sts.mixedreality.azure.com". This "resource" will indicate to Azure AD that your application is requesting a token for the Azure Spatial Anchors service.
108
108
109
-
With that, your application should be able to obtain from ADAL an Azure AD token; you can set that Azure AD token as the **authenticationToken** on your cloud session config object.
109
+
With that, your application should be able to obtain from ADAL an Azure AD token; you can set that Azure AD token as the **authenticationToken** on your cloud session config object.
110
110
111
111
# [C#](#tab/csharp)
112
112
@@ -169,12 +169,12 @@ The Azure AD access token is retrieved using the ADAL library as described in th
169
169
2. Switch to the **Access control (IAM)** tab
170
170
3. Hit **Add role assignment**
171
171
1. [Select a role](#role-based-access-control)
172
-
2. In the **select** field, enter the name of the application(s) you created and to which you want to assign access. If you want your app’s users to have different roles against the Spatial Anchors account, you should register multiple applications in Azure AD, and assign to each a separate role. Then implement your authorization logic to use the right role for your users.
172
+
2. In the **select** field, enter the name of the application(s) you created and to which you want to assign access. If you want your app’s users to have different roles against the Spatial Anchors account, you should register multiple applications in Azure AD, and assign to each a separate role. Then implement your authorization logic to use the right role for your users.
173
173
3. Hit **Save**.
174
174
2. In your code (note: you can use the service sample included on GitHub):
175
175
1. Make sure to use the application ID, application secret, and redirect Uri of your own Azure AD application as the client ID, secret, and RedirectUri parameters in ADAL
176
176
2. Set the tenant ID to your own AAAzure ADD tenant ID in the authority parameter in ADAL
177
-
3. On your token request, set the **resource** to "https://sts.mixedreality.azure.com"
177
+
3. On your token request, set the **resource** to "https://sts.mixedreality.azure.com"
178
178
179
179
With that, your backend service can retrieve an Azure AD token. It can then exchange it for an MR token that it will return back to the client. Using an Azure AD token to retrieve an MR token is done via a REST call. Here is a sample call:
To help control the level of access granted to applications, services or Azure AD users of your service, the following roles have been created for you to assign as needed against your Azure Spatial Anchors accounts:
245
245
246
-
-**Spatial Anchors Account Owner**: applications or users that have this role are able to create spatial anchors, query for them, and delete them. When you authenticate to your account using account keys, the **Spatial Anchors Account Owner** role is assigned to the authenticated principal.
247
-
-**Spatial Anchors Account Contributor**: applications or users that have this role are able to create spatial anchors, query for them, but cannot delete them.
246
+
-**Spatial Anchors Account Owner**: applications or users that have this role are able to create spatial anchors, query for them, and delete them. When you authenticate to your account using account keys, the **Spatial Anchors Account Owner** role is assigned to the authenticated principal.
247
+
-**Spatial Anchors Account Contributor**: applications or users that have this role are able to create spatial anchors, query for them, but cannot delete them.
248
248
-**Spatial Anchors Account Reader**: applications or users that have this role are only able to query for spatial anchors, but cannot create new ones, delete existing ones, or update metadata on spatial anchors. This is typically used for applications where some users curate the environment, while others can only recall anchors previously placed in that environment.
Copy file name to clipboardExpand all lines: articles/spatial-anchors/concepts/guidelines-effective-anchor-experiences.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: Guidelines for effective anchor experiences that use Azure Spatial Anchors | Microsoft Docs
2
+
title: Guidelines for effective anchor experiences
3
3
description: Guidelines and considerations to create and locate anchors effectively by using Azure Spatial Anchors.
4
4
author: mattwojo
5
5
manager: jken
@@ -36,7 +36,7 @@ For dynamic locations, you should think about how you teach or guide users in yo
36
36
37
37
## Stable visual features
38
38
39
-
Visual tracking systems used on mixed-reality and augmented-reality devices rely on visual features of the environment. To get the most reliable experience:
39
+
Visual tracking systems used on mixed-reality and augmented-reality devices rely on visual features of the environment. To get the most reliable experience:
40
40
41
41
-*Do* create anchors in locations that have stable visual features (that is, features that don't change often).
42
42
@@ -58,9 +58,9 @@ In general, when creating an anchor, scan it from the perspectives of the people
58
58
59
59
## Multiple anchors
60
60
61
-
Lighting can make a difference in the visual features that an app detects. Anchors created in strong natural light might be hard to locate in artificial light, and vice versa.
61
+
Lighting can make a difference in the visual features that an app detects. Anchors created in strong natural light might be hard to locate in artificial light, and vice versa.
62
62
63
-
If you have this issue, it can help to create two anchors. At the same spot, create one anchor in the daylight and another in artificial light. Your app can then query for both anchors. When either anchor is located, the app will have a pose for the anchor.
63
+
If you have this issue, it can help to create two anchors. At the same spot, create one anchor in the daylight and another in artificial light. Your app can then query for both anchors. When either anchor is located, the app will have a pose for the anchor.
64
64
65
65
Similarly, in environments where the visual features change because most objects move, multiple anchors can help. When an anchor becomes too difficult to find because of significant changes in the environment, you can replace the anchor with a new one. You might do this, for example, in a retail store where the layout is refreshed every few months.
66
66
@@ -70,7 +70,7 @@ In many cases, an anchor is an entry point to your app's experience. You'll want
70
70
71
71
### Targets
72
72
73
-
In the target scenario, the location of an anchor is well known. For example, in a fictional mixed-reality painting app, one user places a virtual canvas on the wall. She instructs the other users in the room to point their devices at the same place on the wall to locate the anchor and begin the experience.
73
+
In the target scenario, the location of an anchor is well known. For example, in a fictional mixed-reality painting app, one user places a virtual canvas on the wall. She instructs the other users in the room to point their devices at the same place on the wall to locate the anchor and begin the experience.
74
74
75
75
Another example of a target scenario might be a sign in a coffee shop that reads, “Scan for deals.” The coffee shop has placed an anchor here. As users scan the sign, they locate the anchor and enter the augmented-reality experience to find deals on coffee.
76
76
@@ -100,7 +100,7 @@ First, if the user doesn't locate an anchor within a few seconds, the app should
100
100
101
101
For target scenarios, ask the user to move around the target to view it from different perspectives. In other words, ask the user to capture the target from new perspectives until the anchor is located.
102
102
103
-
For room scenarios, ask the user to slowly scan the room. For example, ask the user to turn to capture 180 degrees or even 360 degrees of the room. Or ask the user to view the room from a new perspective.
103
+
For room scenarios, ask the user to slowly scan the room. For example, ask the user to turn to capture 180 degrees or even 360 degrees of the room. Or ask the user to view the room from a new perspective.
104
104
105
105
The most meaningful method is to scan across the room. A scan across the room captures more visual features of the environment than a scan of a nearby wall, for example. A scan of a nearby wall won't capture as many useful visual features of the environment.
0 commit comments