Skip to content

Commit b932b0d

Browse files
Merge pull request #96988 from mikebudzynski/apim-portal-supportability
APIM: new dev portal - answers to common support requests
2 parents 318e2c3 + 1169e20 commit b932b0d

5 files changed

+83
-11
lines changed

articles/api-management/api-management-howto-aad-b2c.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ In the developer portal, sign-in with AAD B2C is possible with the **OAuth butto
8989

9090
Although a new account will be automatically created whenever a new user signs in with AAD B2C, you may consider adding the same widget to the sign-up page.
9191

92+
> [!IMPORTANT]
93+
> You need to [republish the portal](api-management-howto-developer-portal-customize.md#publish) for the AAD changes to take effect.
94+
9295
## Legacy developer portal - how to sign up with Azure AD B2C
9396

9497
[!INCLUDE [api-management-portal-legacy.md](../../includes/api-management-portal-legacy.md)]

articles/api-management/api-management-howto-aad.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ In the developer portal, sign-in with AAD is possible with the **OAuth buttons**
107107

108108
Although a new account will be automatically created whenever a new user signs in with AAD, you may consider adding the same widget to the sign-up page.
109109

110+
> [!IMPORTANT]
111+
> You need to [republish the portal](api-management-howto-developer-portal-customize.md#publish) for the AAD changes to take effect.
112+
110113
## Legacy developer portal - how to sign in with Azure AD
111114

112115
[!INCLUDE [api-management-portal-legacy.md](../../includes/api-management-portal-legacy.md)]

articles/api-management/api-management-howto-developer-portal-customize.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.service: api-management
1111
ms.workload: mobile
1212
ms.tgt_pltfrm: na
1313
ms.topic: article
14-
ms.date: 11/04/2019
14+
ms.date: 11/22/2019
1515
ms.author: apimpm
1616
---
1717

@@ -107,14 +107,17 @@ In the video below we demonstrate how to edit the content of the portal, customi
107107

108108
> [!VIDEO https://www.youtube.com/embed/5mMtUSmfUlw]
109109
110-
## Publish the portal
110+
## <a name="publish"> </a>Publish the portal
111111

112112
To make your portal and its latest changes available to visitors, you need to publish it.
113113

114114
1. Make sure you saved your changes by clicking on the **Save** icon.
115115
1. Click on **Publish website** in the **Operations** section of the menu. This operation may take a few minutes.
116116
![Publish portal](media/api-management-howto-developer-portal-customize/publish-portal.png)
117117

118+
> [!NOTE]
119+
> The portal needs to be republished after API Management service configuration changes, such as assigning a custom domain, updating the identity providers, setting delegation, specifying sign-in and product terms, and more.
120+
118121
## Visit the published portal
119122

120123
After you publish the portal, you can access it at the same URL as the administrative panel, for example `https://contoso-api.developer.azure-api.net`. View it in a separate browser session (incognito / private browsing mode) as an external visitor.

articles/api-management/api-management-howto-developer-portal.md

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ms.service: api-management
1111
ms.workload: mobile
1212
ms.tgt_pltfrm: na
1313
ms.topic: article
14-
ms.date: 11/04/2019
14+
ms.date: 11/22/2019
1515
ms.author: apimpm
1616
---
1717

@@ -61,7 +61,7 @@ The portal components can be logically divided into two categories: *code* and *
6161

6262
*API Management content* includes entities such as APIs, Operations, Products, Subscriptions.
6363

64-
The portal is based on an adapted fork of the [Paperbits framework](https://paperbits.io/). The original Paperbits functionality has been extended to provide API Management-specific widgets (e.g., a list of APIs, a list of Products) and a connector to API Management service for saving and retrieving content.
64+
The portal is based on an adapted fork of the [Paperbits framework](https://paperbits.io/). The original Paperbits functionality has been extended to provide API Management-specific widgets (for example, a list of APIs, a list of Products) and a connector to API Management service for saving and retrieving content.
6565

6666
## <a name="faq"></a> Frequently asked questions
6767

@@ -89,6 +89,8 @@ Portals are incompatible and you need to migrate the content manually.
8989

9090
The new developer portal doesn't support *Applications* and *Issues*. If you have used *Issues* in the old portal and need them in the new one, post a comment in [a dedicated GitHub issue](https://github.com/Azure/api-management-developer-portal/issues/122).
9191

92+
Authentication with OAuth in the interactive developer console is not yet supported. You can track the progress through [the GitHub issue](https://github.com/Azure/api-management-developer-portal/issues/208).
93+
9294
### Has the old portal been deprecated?
9395

9496
The old developer and publisher portals are now *legacy* features - they will be receiving security updates only. New features will be implemented in the new developer portal only.
@@ -105,13 +107,31 @@ The API is documented in [the GitHub repository's wiki section][2]. It can also
105107

106108
No.
107109

108-
### Do I need to enable additional VNET connectivity for the managed portal dependencies?
110+
### Do I need to enable additional VNet connectivity for the new managed portal dependencies?
109111

110-
No.
112+
In most cases - no.
113+
114+
If your API Management service is in an internal VNet, your developer portal is only accessible from within the network. The management endpoint's host name must resolve to the internal VIP of the service from the machine you use to access the portal's administrative interface. Make sure the management endpoint is registered in the DNS. In case of misconfiguration, you will see an error: `Unable to start the portal. See if settings are specified correctly in the configuration (...)`.
115+
116+
### I have assigned a custom API Management domain and the published portal doesn't work
117+
118+
After you update the domain, you need to [republish the portal](api-management-howto-developer-portal-customize.md#publish) for the changes to take effect.
119+
120+
### I have added an identity provider and I can't see it in the portal
111121

112-
### I'm getting a CORS error when using the interactive console. What should I do?
122+
After you configure an identity provider (for example, AAD, AAD B2C), you need to [republish the portal](api-management-howto-developer-portal-customize.md#publish) for the changes to take effect.
113123

114-
The interactive console makes a client-side API request from the browser. You can resolve the CORS problem by adding [a CORS policy](https://docs.microsoft.com/azure/api-management/api-management-cross-domain-policies#CORS) on your API(s). You can specify all the parameters manually or use wildcard `*` values. For example:
124+
### I have set up delegation and the portal doesn't use it
125+
126+
After you set up delegation, you need to [republish the portal](api-management-howto-developer-portal-customize.md#publish) for the changes to take effect.
127+
128+
### My other API Management configuration changes haven't been propagated in the developer portal
129+
130+
Most configuration changes (for example, VNet, sign-in and product terms) require [republishing the portal](api-management-howto-developer-portal-customize.md#publish).
131+
132+
### I'm getting a CORS error when using the interactive console
133+
134+
The interactive console makes a client-side API request from the browser. You can resolve the CORS problem by adding [a CORS policy](api-management-cross-domain-policies.md#CORS) on your API(s). You can specify all the parameters manually or use wildcard `*` values. For example:
115135

116136
```XML
117137
<cors>
@@ -145,6 +165,46 @@ The interactive console makes a client-side API request from the browser. You ca
145165
>
146166
> As a workaround you can pass the subscription key in a query parameter.
147167
168+
### What permissions do I need to edit the developer portal?
169+
170+
If you're seeing the `Oops. Something went wrong. Please try again later.` error when you open the portal in the administrative mode, you may be lacking the required permissions (RBAC).
171+
172+
The legacy portals required the permission `Microsoft.ApiManagement/service/getssotoken/action` at the service scope (`/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-service-name>`) to allow the user administrator access to the portals. The new portal requires the permission `Microsoft.ApiManagement/service/users/token/action` at the scope `/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-service-name>/users/1`.
173+
174+
You can use the following PowerShell script to create a role with the required permission. Remember to change the `<subscription-id>` parameter.
175+
176+
```PowerShell
177+
#New Portals Admin Role
178+
Import-Module Az
179+
Connect-AzAccount
180+
$contributorRole = Get-AzRoleDefinition "API Management Service Contributor"
181+
$customRole = $contributorRole
182+
$customRole.Id = $null
183+
$customRole.Name = "APIM New Portal Admin"
184+
$customRole.Description = "This role gives the user ability to log in to the new Developer portal as administrator"
185+
$customRole.Actions = "Microsoft.ApiManagement/service/users/token/action"
186+
$customRole.IsCustom = $true
187+
$customRole.AssignableScopes.Clear()
188+
$customRole.AssignableScopes.Add('/subscriptions/<subscription-id>')
189+
New-AzRoleDefinition -Role $customRole
190+
```
191+
192+
Once the role is created, it can be granted to any user from the **Access Control (IAM)** section in the Azure portal. Assigning this role to a user will assign the permission at the service scope. The user will be able to generate SAS tokens on behalf of *any* user in the service. At the minimum, this role needs to be assigned to the administrator of the service. The following PowerShell command demonstrates how to assign the role to a user `user1` at the lowest scope to avoid granting unnecessary permissions to the user:
193+
194+
```PowerShell
195+
New-AzRoleAssignment -SignInName "[email protected]" -RoleDefinitionName "APIM New Portal Admin" -Scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.ApiManagement/service/<apim-service-name>/users/1"
196+
```
197+
198+
After the permissions have been granted to a user, the user must sign out and sign in again to the Azure portal for the new permissions to take effect.
199+
200+
### I'm seeing the `Unable to start the portal. See if settings are specified correctly (...)` error
201+
202+
This error is shown when a `GET` call to `https://<management-endpoint-hostname>/subscriptions/xxx/resourceGroups/xxx/providers/Microsoft.ApiManagement/service/xxx/contentTypes/document/contentItems/configuration?api-version=2018-06-01-preview` fails. The call is issued from the browser by the administrative interface of the portal.
203+
204+
If your API Management service is in a VNet - refer to the VNet connectivity question above.
205+
206+
The call failure may also be caused by an SSL certificate, which is assigned to a custom domain and is not trusted by the browser. As a mitigation, you can remove the management endpoint custom domain - API Management will fall back to the default endpoint with a trusted certificate.
207+
148208
## Next steps
149209

150210
Learn more about the new developer portal:

articles/api-management/api-management-howto-setup-delegation.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ ms.author: apimpm
1818
---
1919
# How to delegate user registration and product subscription
2020

21-
Delegation allows you to use your existing website for handling developer sign in/sign up and subscription to products, as opposed to using the built-in functionality in the developer portal. This enables your website to own the user data and perform the validation of these steps in a custom way.
21+
Delegation allows you to use your existing website for handling developer sign in/sign up and subscription to products, as opposed to using the built-in functionality in the developer portal. It enables your website to own the user data and perform the validation of these steps in a custom way.
2222

2323
[!INCLUDE [premium-dev-standard-basic.md](../../includes/api-management-availability-premium-dev-standard-basic.md)]
2424

25-
## <a name="delegate-signin-up"> </a>Delegating developer sign in and sign up
25+
## <a name="delegate-signin-up"> </a>Delegating developer sign-in and sign-up
2626

27-
To delegate developer sign in and sign up to your existing website, you'll need to create a special delegation endpoint on your site. It needs to act as the entry-point for any such request initiated from the API Management developer portal.
27+
To delegate developer, sign in and sign up to your existing website, you'll need to create a special delegation endpoint on your site. It needs to act as the entry-point for any such request initiated from the API Management developer portal.
2828

2929
The final workflow will be as follows:
3030

@@ -170,6 +170,9 @@ var digest = hmac.update(salt + '\n' + returnUrl).digest();
170170
var signature = digest.toString('base64');
171171
```
172172

173+
> [!IMPORTANT]
174+
> You need to [republish the developer portal](api-management-howto-developer-portal-customize.md#publish) for the delegation changes to take effect.
175+
173176
## Next steps
174177
For more information on delegation, see the following video:
175178

0 commit comments

Comments
 (0)