|
| 1 | +--- |
| 2 | +title: Set up basic authentication to developer portal |
| 3 | +titleSuffix: Azure API Management |
| 4 | +description: Learn how to set up user accounts with username and password authentication to the developer portal in Azure API Management. |
| 5 | + |
| 6 | +author: dlepow |
| 7 | +ms.service: api-management |
| 8 | +ms.topic: article |
| 9 | +ms.date: 08/30/2022 |
| 10 | +ms.author: danlep |
| 11 | +--- |
| 12 | + |
| 13 | +# Configure users of the developer portal to authenticate using usernames and passwords |
| 14 | + |
| 15 | +In the developer portal for Azure API Management, the default authentication method for users is to provide a username and password. In this article, learn how to set up users with basic authentication credentials to the developer portal. |
| 16 | + |
| 17 | + |
| 18 | +## Prerequisites |
| 19 | + |
| 20 | +- Complete the [Create an Azure API Management instance](get-started-create-service-instance.md) quickstart. |
| 21 | + |
| 22 | +[!INCLUDE [premium-dev-standard.md](../../includes/api-management-availability-premium-dev-standard.md)] |
| 23 | + |
| 24 | +[!INCLUDE [api-management-navigate-to-instance.md](../../includes/api-management-navigate-to-instance.md)] |
| 25 | + |
| 26 | + |
| 27 | +## Confirm the username and password provider |
| 28 | + |
| 29 | +By default, the username and password *identity provider* is enabled in the developer portal. To confirm this setting: |
| 30 | + |
| 31 | +1. In the left menu of your API Management instance, under **Developer portal**, select **Identities**. |
| 32 | +1. In the **Provider type** list, confirm that **Username and password** appears. |
| 33 | + |
| 34 | +If the provider isn't already enabled, you can add it: |
| 35 | + |
| 36 | +1. In the left menu of your API Management instance, under **Developer portal**, select **Identities** > **+ Add**. |
| 37 | +1. Under **Type**, select **Username and password**, and then select **Add**. |
| 38 | + |
| 39 | +## Add a username and password |
| 40 | + |
| 41 | +There are two ways to add a username and password for authentication to the developer portal: |
| 42 | + |
| 43 | +* An API publisher can add a user through the Azure portal, or with equivalent Azure tools such as the [New-AzApiManagementUser](/powershell/module/az.apimanagement/new-azapimanagementuser) Azure PowerShell cmdlet. For steps to use the portal, see [How to manage user accounts in Azure API Management](api-management-howto-create-or-invite-developers.md). |
| 44 | + |
| 45 | + :::image type="content" source="media/developer-portal-basic-authentication/add-user-portal.png" alt-text="Screenshot showing how to add a user in the Azure portal."::: |
| 46 | + |
| 47 | +* An API consumer (developer) can sign up directly in the developer portal, using the **Sign up** page. |
| 48 | + |
| 49 | + :::image type="content" source="media/developer-portal-basic-authentication/developer-portal-sign-up-page.png" alt-text="Screenshot of the sign-up page in the developer portal."::: |
| 50 | + |
| 51 | +> [!NOTE] |
| 52 | +> API Management enforces password strength requirements including password length. When you add a user in the Azure portal, the password must be at least 6 characters long. When a developer signs up or resets a password through the developer portal, the password must be at least 8 characters long. |
| 53 | +
|
| 54 | +## Delete the username and password provider |
| 55 | + |
| 56 | +If you've configured another identity provider for the developer portal such as [Azure AD](api-management-howto-aad.md) or [Azure AD B2C](api-management-howto-aad-b2c.md), you might want to delete the username and password provider. |
| 57 | + |
| 58 | +Deleting the identity provider prevents adding users to use username and password authentication. Existing users configured for basic authentication are also prevented from signing into the developer portal. |
| 59 | + |
| 60 | +1. In the left menu of your API Management instance, under **Developer portal**, select **Identities**. |
| 61 | +1. In the **Provider type** list, select **Username and password**. In the context menu (**...**), select **Delete**. |
| 62 | + |
| 63 | +> [!TIP] |
| 64 | +> If you want to disable all sign up or sign in functionality in the developer portal, see [How do I disable sign up in the developer portal?](developer-portal-faq.md#how-do-i-disable-sign-up-in-the-developer-portal) |
| 65 | +
|
| 66 | + |
| 67 | +## Next steps |
| 68 | + |
| 69 | +For steps to add other identity providers for developer sign-up to the developer portal, see: |
| 70 | + |
| 71 | +- [Authorize developer accounts by using Azure Active Directory in Azure API Management](api-management-howto-aad.md) |
| 72 | +- [Authorize developer accounts by using Azure Active Directory B2C in Azure API Management](api-management-howto-aad-b2c.md) |
0 commit comments