Skip to content

Support resource type id of App Configuration #19660

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Accounts/Accounts/Rest/InvokeAzRestMethodCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,11 @@ private string MatchResourceId(IAzureContext context, string authority, out stri
targetResourceIdKey = AzureEnvironment.Endpoint.DataLakeEndpointResourceId;
return env.DataLakeEndpointResourceId;
}
if (HasSameEndpointSuffix(authority, env.ExtendedProperties[AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointSuffix]))
{
targetResourceIdKey = AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId;
return env.ExtendedProperties[AzureEnvironment.ExtendedEndpoint.AzureAppConfigurationEndpointResourceId];
}
return null;
}

Expand Down
1 change: 1 addition & 0 deletions src/Accounts/Accounts/Token/GetAzureRmAccessToken.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class GetAzureRmAccessTokenCommand : AzureRMCmdlet
SupportedResourceNames.AadGraph,
SupportedResourceNames.MSGraph,
SupportedResourceNames.AnalysisServices,
SupportedResourceNames.AppConfiguration,
SupportedResourceNames.Arm,
SupportedResourceNames.Attestation,
SupportedResourceNames.Batch,
Expand Down
4 changes: 3 additions & 1 deletion src/Accounts/Accounts/Utilities/SupportedResourceNames.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ internal class SupportedResourceNames
public const string Storage = "Storage";
public const string Synapse = "Synapse";
public const string ManagedHsm = "ManagedHsm";
public const string AppConfiguration = "AppConfiguration";

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

ResourceNameMap = new Dictionary<string, string>(DataPlaneResourceNameMap);
Expand Down
10 changes: 5 additions & 5 deletions src/Accounts/Accounts/help/Get-AzAccessToken.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ Get access token of Microsoft Graph endpoint for current account
The credentials, account, tenant, and subscription used for communication with Azure.

```yaml
Type: Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Type: IAzureContextContainer
Parameter Sets: (All)
Aliases: AzContext, AzureRmContext, AzureCredential

Expand All @@ -68,10 +68,10 @@ Accept wildcard characters: False
```

### -ResourceTypeName
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.
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.

```yaml
Type: System.String
Type: String
Parameter Sets: KnownResourceTypeName
Aliases:

Expand All @@ -86,7 +86,7 @@ Accept wildcard characters: False
Resource url for that you're requesting token, e.g. 'https://graph.microsoft.com/'.

```yaml
Type: System.String
Type: String
Parameter Sets: ResourceUrl
Aliases: Resource, ResourceUri

Expand All @@ -101,7 +101,7 @@ Accept wildcard characters: False
Optional Tenant Id. Use tenant id of default context if not specified.

```yaml
Type: System.String
Type: String
Parameter Sets: (All)
Aliases:

Expand Down