Skip to content

Commit 86ba240

Browse files
authored
Support resource type id of App Configuration (#19660)
* update * update doc * update code
1 parent 33ca576 commit 86ba240

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

src/Accounts/Accounts/Rest/InvokeAzRestMethodCommand.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,11 @@ private string MatchResourceId(IAzureContext context, string authority, out stri
250250
targetResourceIdKey = AzureEnvironment.Endpoint.DataLakeEndpointResourceId;
251251
return env.DataLakeEndpointResourceId;
252252
}
253+
if (HasSameEndpointSuffix(authority, env.ExtendedProperties[AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix]))
254+
{
255+
targetResourceIdKey = AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId;
256+
return env.ExtendedProperties[AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId];
257+
}
253258
return null;
254259
}
255260

src/Accounts/Accounts/Token/GetAzureRmAccessToken.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class GetAzureRmAccessTokenCommand : AzureRMCmdlet
5050
SupportedResourceNames.AadGraph,
5151
SupportedResourceNames.MSGraph,
5252
SupportedResourceNames.AnalysisServices,
53+
SupportedResourceNames.AppConfiguration,
5354
SupportedResourceNames.Arm,
5455
SupportedResourceNames.Attestation,
5556
SupportedResourceNames.Batch,

src/Accounts/Accounts/Utilities/SupportedResourceNames.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ internal class SupportedResourceNames
3434
public const string Storage = "Storage";
3535
public const string Synapse = "Synapse";
3636
public const string ManagedHsm = "ManagedHsm";
37+
public const string AppConfiguration = "AppConfiguration";
3738

3839
internal static Dictionary<string, string> ResourceNameMap;
3940
internal static Dictionary<string, string> DataPlaneResourceNameMap;
@@ -54,7 +55,8 @@ static SupportedResourceNames()
5455
{ OperationalInsights, AzureEnvironment.ExtendedEndpoint.OperationalInsightsEndpointResourceId },
5556
{ Storage, "https://storage.azure.com/" }, //OAuth scope/resource id for Storage, does not add it to ExtenedEndpoint to avoid confusion with StorageEndpointSuffix
5657
{ Synapse, AzureEnvironment.ExtendedEndpoint.AzureSynapseAnalyticsEndpointResourceId },
57-
{ ManagedHsm, AzureEnvironment.ExtendedEndpoint.ManagedHsmServiceEndpointResourceId }
58+
{ ManagedHsm, AzureEnvironment.ExtendedEndpoint.ManagedHsmServiceEndpointResourceId },
59+
{ AppConfiguration, AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId }
5860
};
5961

6062
ResourceNameMap = new Dictionary<string, string>(DataPlaneResourceNameMap);

src/Accounts/Accounts/help/Get-AzAccessToken.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Get access token of Microsoft Graph endpoint for current account
5656
The credentials, account, tenant, and subscription used for communication with Azure.
5757

5858
```yaml
59-
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
59+
Type: IAzureContextContainer
6060
Parameter Sets: (All)
6161
Aliases: AzContext, AzureRmContext, AzureCredential
6262

@@ -68,10 +68,10 @@ Accept wildcard characters: False
6868
```
6969
7070
### -ResourceTypeName
71-
Optional resource type name, supported values: AadGraph, AnalysisServices, Arm, Attestation, Batch, DataLake, KeyVault, MSGraph, OperationalInsights, ResourceManager, Storage, Synapse. Default value is Arm if not specified.
71+
Optional resource type name, supported values: AadGraph, AnalysisServices, AppConfiguration, Arm, Attestation, Batch, DataLake, KeyVault, MSGraph, OperationalInsights, ResourceManager, Storage, Synapse. Default value is Arm if not specified.
7272
7373
```yaml
74-
Type: System.String
74+
Type: String
7575
Parameter Sets: KnownResourceTypeName
7676
Aliases:
7777

@@ -86,7 +86,7 @@ Accept wildcard characters: False
8686
Resource url for that you're requesting token, e.g. 'https://graph.microsoft.com/'.
8787
8888
```yaml
89-
Type: System.String
89+
Type: String
9090
Parameter Sets: ResourceUrl
9191
Aliases: Resource, ResourceUri
9292

@@ -101,7 +101,7 @@ Accept wildcard characters: False
101101
Optional Tenant Id. Use tenant id of default context if not specified.
102102
103103
```yaml
104-
Type: System.String
104+
Type: String
105105
Parameter Sets: (All)
106106
Aliases:
107107

0 commit comments

Comments
 (0)