Skip to content

Commit 7856d87

Browse files
author
Tiago Brenck
committed
Workaround for issue: #251
Changed ARM scope to "https://management.core.windows.net" so I can work for MT apps. This is a workaround since "https://management.azure.com" was supossed to work. ARM team is already investigating
1 parent 6b150dc commit 7856d87

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

3-WebApp-multi-APIs/Controllers/HomeController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public async Task<IActionResult> Profile()
5252

5353
// Requires that the app has added the Azure Service Management / user_impersonation scope, and that
5454
// the admin tenant does not require admin consent for ARM.
55-
[AuthorizeForScopes(Scopes = new[] { "https://management.azure.com/user_impersonation", "user.read", "directory.read.all" })]
55+
[AuthorizeForScopes(Scopes = new[] { "https://management.core.windows.net/user_impersonation", "user.read", "directory.read.all" })]
5656
public async Task<IActionResult> Tenants()
5757
{
5858
var accessToken =

3-WebApp-multi-APIs/Services/ARM/ArmOperationsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public async Task<IEnumerable<string>> EnumerateTenantsIdsAccessibleByUser(strin
3535

3636
// Use Azure Resource manager to get the list of a tenant accessible by a user
3737
// https://docs.microsoft.com/en-us/rest/api/resources/tenants/list
38-
public static string ArmResource { get; } = "https://management.azure.com/";
38+
public static string ArmResource { get; } = "https://management.core.windows.net/";
3939

4040
protected string ArmListTenantUrl { get; } = "https://management.azure.com/tenants?api-version=2016-06-01";
4141
}

0 commit comments

Comments
 (0)