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
# How to secure a single-page web application with non-interactive sign-in
15
15
16
-
This article describes how to secure a single-page web application with Azure Active Directory (Azure AD), when the user isn't able to sign in to Azure AD.
16
+
Secure a single-page web application with Azure Active Directory (Azure AD), even when the user isn't able to sign in to Azure AD.
17
17
18
-
To create this non-interactive authentication flow, we'll create an Azure Function secure web service that's responsible for acquiring access tokens from Azure AD. This web service will be exclusively available only to your single-page web application.
18
+
To create this non-interactive authentication flow, first create an Azure Function secure web service that's responsible for acquiring access tokens from Azure AD. This web service is exclusively available only to your single-page web application.
> Azure Maps can support access tokens from user sign-on or interactive flows. You can use interactive flows for a more restricted scope of access revocation and secret management.
24
24
25
25
## Create an Azure function
26
26
27
27
To create a secured web service application that's responsible for authentication to Azure AD:
28
28
29
-
1. Create a function in the Azure portal. For more information, see [Getting started with Azure Functions](../azure-functions/functions-get-started.md).
29
+
1. Create a function in the Azure portal. For more information, see [Getting started with Azure Functions].
30
30
31
-
2. Configure CORS policy on the Azure function to be accessible by the single-page web application. The CORS policy secures browser clients to the allowed origins of your web application. For more information, see [Add CORS functionality](../app-service/app-service-web-tutorial-rest-api.md#add-cors-functionality).
31
+
2. Configure CORS policy on the Azure function to be accessible by the single-page web application. The CORS policy secures browser clients to the allowed origins of your web application. For more information, see [Add CORS functionality].
32
32
33
-
3.[Add a system-assigned identity](../app-service/overview-managed-identity.md?tabs=dotnet#add-a-system-assigned-identity) on the Azure function to enable creation of a service principal to authenticate to Azure AD.
33
+
3.[Add a system-assigned identity] on the Azure function to enable creation of a service principal to authenticate to Azure AD.
34
34
35
-
4. Grant role-based access for the system-assigned identity to the Azure Maps account. For details, see [Grant role-based access](#grant-role-based-access-for-users-to-azure-maps).
35
+
4. Grant role-based access for the system-assigned identity to the Azure Maps account. For more information, see [Grant role-based access].
36
36
37
-
5. Write code for the Azure function to obtain Azure Maps access tokens using system-assigned identity with one of the supported mechanisms or the REST protocol. For more information, see [Obtain tokens for Azure resources](../app-service/overview-managed-identity.md?tabs=dotnet#add-a-system-assigned-identity)
37
+
5. Write code for the Azure function to obtain Azure Maps access tokens using system-assigned identity with one of the supported mechanisms or the REST protocol. For more information, see [Obtain tokens for Azure resources].
38
38
39
39
Here's an example REST protocol:
40
40
@@ -60,7 +60,7 @@ To create a secured web service application that's responsible for authenticatio
60
60
61
61
6. Configure security for the Azure function HttpTrigger:
62
62
63
-
1. [Create a function access key](../azure-functions/functions-bindings-http-webhook-trigger.md?tabs=csharp#authorization-keys)
63
+
1. [Create a function access key]
64
64
1. [Secure HTTP endpoint](../azure-functions/functions-bindings-http-webhook-trigger.md?tabs=csharp#secure-an-http-endpoint-in-production) for the Azure function in production.
65
65
66
66
7. Configure a web application Azure Maps Web SDK.
@@ -111,3 +111,10 @@ Find the API usage metrics for your Azure Maps account:
111
111
Explore other samples that show how to integrate Azure AD with Azure Maps:
0 commit comments