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/app-service/app-service-authentication-how-to.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@ When using fully qualified URLs, the URL must be either hosted in the same domai
127
127
GET /.auth/logout?post_logout_redirect_uri=https%3A%2F%2Fmyexternalurl.com
128
128
```
129
129
130
-
You must run the following command in the [Azure Cloud Shell](../cloud-shell/quickstart.md):
130
+
Run the following command in the [Azure Cloud Shell](../cloud-shell/quickstart.md):
131
131
132
132
```azurecli-interactive
133
133
az webapp auth update --name <app_name> --resource-group <group_name> --allowed-external-redirect-urls "https://myexternalurl.com"
@@ -194,7 +194,7 @@ When your provider's access token (not the [session token](#extend-session-token
194
194
195
195
Once your provider is configured, you can [find the refresh token and the expiration time for the access token](#retrieve-tokens-in-app-code) in the token store.
196
196
197
-
To refresh your access token at anytime, just call `/.auth/refresh` in any language. The following snippet uses jQuery to refresh your access tokens from a JavaScript client.
197
+
To refresh your access token at any time, just call `/.auth/refresh` in any language. The following snippet uses jQuery to refresh your access tokens from a JavaScript client.
198
198
199
199
```JavaScript
200
200
function refreshTokens() {
@@ -247,6 +247,10 @@ This setting appends the `domain_hint` query string parameter to the login redir
247
247
248
248
While App Service takes care of the simplest authorization case (i.e. reject unauthenticated requests), your app may require more fine-grained authorization behavior, such as limiting access to only a specific group of users. In certain cases, you need to write custom application code to allow or deny access to the signed-in user. In other cases, App Service or your identity provider may be able to help without requiring code changes.
For any Windows app, you can define authorization behavior of the IIS web server, by editing the *Web.config* file. Linux apps don't use IIS and can't be configured through *Web.config*.
@@ -278,7 +282,7 @@ The identity provider may provide certain turn-key authorization. For example:
278
282
279
283
### Application level
280
284
281
-
285
+
If either of the other levels don't provide the authorization you need, or if your platform or identity provider isn't supported, you must write custom code to authorize users based on the [user claims](#access-user-claims).
Copy file name to clipboardExpand all lines: articles/app-service/configure-authentication-provider-aad.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@ ms.custom: seodec18
28
28
29
29
This article shows you how to configure Azure App Service to use Azure Active Directory as an authentication provider.
30
30
31
-
You should configure each App Service app with its own registration, so it has its own permissions and consent. Also, consider using separate app registrations for separate deployment slots. This avoids permission sharing between environments, so that a bug in new code you are testing does not affect production.
31
+
It's recommended that you configure each App Service app with its own registration, so it has its own permissions and consent. Also, consider using separate app registrations for separate deployment slots. This avoids permission sharing between environments, so that an issue in new code you're testing does not affect production.
32
32
33
33
## <aname="express"> </a>Configure with express settings
34
34
@@ -39,7 +39,7 @@ You should configure each App Service app with its own registration, so it has i
39
39
app registration instead, click **Select an existing app** and then search for the name of a previously created app registration within your tenant.
40
40
Click the app registration to select it and click **OK**. Then click **OK** on the Azure Active Directory settings page.
41
41
By default, App Service provides authentication but does not restrict authorized access to your site content and APIs. You must authorize users in your app code.
42
-
5. (Optional) To restrict access to your site to only users authenticated by Azure Active Directory, set **Action to take when request is not authenticated** to **Log in with Azure Active Directory**. This requires that all requests be authenticated, and all unauthenticated requests are redirected to Azure Active Directory for authentication.
42
+
5. (Optional) To restrict access to your app to only users authenticated by Azure Active Directory, set **Action to take when request is not authenticated** to **Log in with Azure Active Directory**. This requires that all requests be authenticated, and all unauthenticated requests are redirected to Azure Active Directory for authentication.
43
43
44
44
> [!CAUTION]
45
45
> Restricting access in this way applies to all calls to your app, which may not be desirable for apps wanting a publicly available home page, as in many single-page applications. For such applications, **Allow anonymous requests (no action)** may be preferred, with the app manually starting login itself, as described [here](overview-authentication-authorization.md#authentication-flow).
@@ -48,13 +48,13 @@ You should configure each App Service app with its own registration, so it has i
48
48
49
49
## <aname="advanced"> </a>Configure with advanced settings
50
50
51
-
You can also provide configuration settings manually. This is the preferred solution if the Azure Active Directory tenant you wish to use is different from the tenant with which you sign into Azure. To complete the configuration, you must first create a registration in Azure Active Directory, and then you must provide some of the registration details to App Service.
51
+
You can also provide configuration settings manually, if the Azure Active Directory tenant you want to use is different from the tenant with which you sign into Azure. To complete the configuration, you must first create a registration in Azure Active Directory, and then you must provide some of the registration details to App Service.
52
52
53
53
### <aname="register"> </a>Create an app registration in Azure AD for your App Service app
54
54
55
-
When creating an app registration, note three pieces of information that you will need later when configuring your App Service app: the client ID, the tenant ID, and optionally the client secret and the app ID URI.
55
+
When creating an app registration manually, note three pieces of information that you will need later when configuring your App Service app: the client ID, the tenant ID, and optionally the client secret and the application ID URI.
56
56
57
-
1. In the [Azure portal], navigate to your App Service app and note your app's **URL**. You will use this to configure your Azure Active Directory app registration.
57
+
1. In the [Azure portal], navigate to your App Service app and note your app's **URL**. You will use it to configure your Azure Active Directory app registration.
58
58
2. In the [Azure portal], from the left menu, select **Active Directory** > **App registrations** > **New registration**.
59
59
3. In the **Register an application** page, enter a **Name** for your app registration.
60
60
1. In **Redirect URI**, select **Web** and type the URL of your App Service app and append the path `/.auth/login/aad/callback`. For example, `https://contoso.azurewebsites.net/.auth/login/aad/callback`. Then select **Create**.
@@ -80,13 +80,13 @@ When creating an app registration, note three pieces of information that you wil
80
80
|Client ID| Use the **Application (client) ID** of the app registration. |
81
81
|Issuer ID| Use `https://login.microsoftonline.com/<tenant-id>`, and replace *\<tenant-id>* with the **Directory (tenant) ID** of the app registration. |
82
82
|Client Secret (Optional)| Use the client secret you generated in the app registration.|
83
-
|Allowed Token Audiences| If this is a *backend* app and you want to allow authentication tokens from a frontend app, add the **Application ID URI** of the *front end* here. |
83
+
|Allowed Token Audiences| If this is a *back-end* app and you want to allow authentication tokens from a front-end app, add the **Application ID URI** of the *front end* here. |
84
84
1. Select **OK**, then select **Save**.
85
85
86
86
You are now ready to use Azure Active Directory for authentication in your App Service app.
87
87
88
88
## Configure a native client application
89
-
You can register native clients, which provides greater control over permissions mapping. You need this if you wish to perform sign-ins using a client library such as the **Active Directory Authentication Library**.
89
+
You can register native clients if you wish to perform sign-ins using a client library such as the **Active Directory Authentication Library**.
90
90
91
91
2. In the [Azure portal], from the left menu, select **Active Directory** > **App registrations** > **New registration**.
92
92
3. In the **Register an application** page, enter a **Name** for your app registration.
Copy file name to clipboardExpand all lines: articles/app-service/configure-authentication-provider-facebook.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,23 +27,23 @@ To complete the procedure in this topic, you must have a Facebook account that h
27
27
28
28
## <aname="register"> </a>Register your application with Facebook
29
29
1. Navigate to the [Facebook Developers] website and sign-in with your Facebook account credentials.
30
-
3. (Optional) If you don't have a Facebook for Developers account, click **Get Started** and follow the registration steps.
30
+
3. (Optional) If you don't have a Facebook for Developers account, click **Get Started**, and follow the registration steps.
31
31
4. Click **My Apps** > **Add New App**.
32
-
5. In **Display Name**, type a unique name for your app. Also provide your **Contact Email**, and then click **Create App ID** and complete the security check. This takes you to the developer dashboard for your new Facebook app.
32
+
5. In **Display Name**, type a unique name for your app. Also provide your **Contact Email**, and then click **Create App ID** and complete the security check. The developer dashboard for your new Facebook app is opened.
1. In the left-hand navigation under **Facebook Login**, click **Settings**.
35
35
1. In **Valid OAuth redirect URIs**, type `https://<app-name>.azurewebsites.net/.auth/login/facebook/callback` and replace *\<app-name>* with the name of your Azure App Service app. Click **Save Changes**.
36
-
8. In the left-hand navigation, click **Settings** > **Basic**. On the **App Secret** field, click **Show**. Copy the values of **App ID** and **App Secret**. You use these later to configure your App Service app in Azure.
36
+
8. In the left-hand navigation, click **Settings** > **Basic**. On the **App Secret** field, click **Show**. Copy the values of **App ID** and **App Secret**. You use them later to configure your App Service app in Azure.
37
37
38
38
> [!IMPORTANT]
39
39
> The app secret is an important security credential. Do not share this secret with anyone or distribute it within a client application.
40
40
>
41
41
>
42
-
9. The Facebook account which was used to register the application is an administrator of the app. At this point, only administrators can sign into this application. To authenticate other Facebook accounts, click **App Review** and enable **Make \<your-app-name> public** to enable general public access using Facebook authentication.
42
+
9. The Facebook account that you used to register the application is an administrator of the app. At this point, only administrators can sign into this application. To authenticate other Facebook accounts, click **App Review** and enable **Make \<your-app-name> public** to enable general public access using Facebook authentication.
43
43
44
44
## <aname="secrets"> </a>Add Facebook information to your application
45
45
1. Sign in to the [Azure portal] and navigate to your App Service app. Click **Settings** > **Authentication / Authorization**, and make sure that **App Service Authentication** is **On**.
46
-
2. Click **Facebook**, paste in the App ID and App Secret values which you obtained previously, optionally enable any scopes needed by your application, then click **OK**.
46
+
2. Click **Facebook**, paste in the App ID and App Secret values that you obtained previously, optionally enable any scopes needed by your application, then click **OK**.
Copy file name to clipboardExpand all lines: articles/app-service/configure-authentication-provider-google.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,16 +29,16 @@ To complete the procedure in this topic, you must have a Google account that has
29
29
2. Follow the Google documentation at [Google Sign-In for server-side apps](https://developers.google.com/identity/sign-in/web/server-side-flow) to create a client ID and client secret, with the following information (no need to make any code changes):
30
30
- For **Authorized JavaScript Origins**, use `https://<app-name>.azurewebsites.net` with the name of your app in *\<app-name>*.
31
31
- For **Authorized Redirect URI**, use `https://<app-name>.azurewebsites.net/.auth/login/google/callback`.
32
-
1. Once the client ID and client secrets are create, copy their values.
32
+
1. Once the client ID and client secrets are created, copy their values.
33
33
34
34
> [!IMPORTANT]
35
35
> The client secret is an important security credential. Do not share this secret with anyone or distribute it within a client application.
36
36
37
37
38
38
## <aname="secrets"> </a>Add Google information to your application
39
-
1. In to the [Azure portal], navigate to your App Service app. From the left menu, select **Authentication / Authorization**.
39
+
1. In the [Azure portal], navigate to your App Service app. From the left menu, select **Authentication / Authorization**.
40
40
2. If the Authentication / Authorization feature is not enabled, turn the switch to **On**.
41
-
3. Click **Google**. Paste in the App ID and App Secret values which you obtained previously, and optionally enable any scopes your application requires. Then click **OK**.
41
+
3. Click **Google**. Paste in the App ID and App Secret values that you obtained previously, and optionally enable any scopes your application requires. Then click **OK**.
42
42
43
43
App Service provides authentication but does not restrict authorized access to your site content and APIs. For more information, see [Authorize or deny users](app-service-authentication-how-to.md#authorize-or-deny-users).
44
44
4. (Optional) To restrict access to your site to only users authenticated by Google, set **Action to take when request is not authenticated** to **Google**. This requires that all requests be authenticated, and all unauthenticated requests are redirected to Google for authentication.
Copy file name to clipboardExpand all lines: articles/app-service/configure-authentication-provider-twitter.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,10 +26,10 @@ This topic shows you how to configure Azure App Service to use Twitter as an aut
26
26
To complete the procedure in this topic, you must have a Twitter account that has a verified email address and phone number. To create a new Twitter account, go to <ahref="https://go.microsoft.com/fwlink/p/?LinkID=268287"target="_blank">twitter.com</a>.
27
27
28
28
## <aname="register"> </a>Register your application with Twitter
29
-
1. Log on to the [Azure portal], and navigate to your application. Copy your **URL**. You will use this to configure your Twitter app.
29
+
1. Log on to the [Azure portal], and navigate to your application. Copy your **URL**. You will use it to configure your Twitter app.
30
30
2. Navigate to the [Twitter Developers] website, sign in with your Twitter account credentials, and click **Create New App**.
31
-
3. Type in the **Name** and a **Description** for your new app. Paste in your application's **URL** for the **Website** value. Then, for the **Callback URL**, paste the **Callback URL** you copied earlier. This is your Mobile App gateway appended with the path, */.auth/login/twitter/callback*. For example, `https://contoso.azurewebsites.net/.auth/login/twitter/callback`. Make sure that you are using the HTTPS scheme.
32
-
4. At the bottom the page, read and accept the terms. Then click **Create your Twitter application**. This registers the app displays the application details.
31
+
3. Type in the **Name** and a **Description** for your new app. Paste in your application's **URL** for the **Website** value. Then, for the **Callback URL**, type the URL of your App Service app and append the path`/.auth/login/aad/callback`. For example, `https://contoso.azurewebsites.net/.auth/login/twitter/callback`. Make sure that you are using the HTTPS scheme.
32
+
4. At the bottom the page, read and accept the terms. Then click **Create your Twitter application**. The application details are displayed.
33
33
5. Click the **Settings** tab, check **Allow this application to be used to sign in with Twitter**, then click **Update Settings**.
34
34
6. Select the **Keys and Access Tokens** tab. Make a note of the values of **Consumer Key (API Key)** and **Consumer secret (API Secret)**.
35
35
@@ -41,7 +41,7 @@ To complete the procedure in this topic, you must have a Twitter account that ha
41
41
## <aname="secrets"> </a>Add Twitter information to your application
42
42
1. Back in the [Azure portal], navigate to your application. Click **Settings**, and then **Authentication / Authorization**.
43
43
2. If the Authentication / Authorization feature is not enabled, turn the switch to **On**.
44
-
3. Click **Twitter**. Paste in the App ID and App Secret values which you obtained previously. Then click **OK**.
44
+
3. Click **Twitter**. Paste in the App ID and App Secret values that you obtained previously. Then click **OK**.
0 commit comments