diff --git a/cli/azd/cmd/container.go b/cli/azd/cmd/container.go index 769869c902e..57cb58604f8 100644 --- a/cli/azd/cmd/container.go +++ b/cli/azd/cmd/container.go @@ -10,7 +10,6 @@ import ( "github.com/Azure/azure-sdk-for-go/sdk/azcore" "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" - "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/authorization/armauthorization" "github.com/MakeNowJust/heredoc/v2" "github.com/azure/azure-dev/cli/azd/cmd/actions" "github.com/azure/azure-dev/cli/azd/cmd/middleware" @@ -399,24 +398,6 @@ func registerCommonDependencies(container *ioc.NestedContainer) { BuildArmClientOptions() }) - ///////////////////////////////////////////// - container.MustRegisterSingleton(func( - credential account.TokenCredentialForSubscription, - clientOptionsBuilderFactory azsdk.ClientOptionsBuilderFactory, - userAgent httputil.UserAgent, - ) (*armauthorization.RoleDefinitionsClient, error) { - // Custom options because this client does not have correlation policies - options := clientOptionsBuilderFactory.ClientOptionsBuilder(). - WithPerCallPolicy(azsdk.NewUserAgentPolicy(string(userAgent))). - BuildArmClientOptions() - client, err := armauthorization.NewRoleDefinitionsClient(credential, options) - if err != nil { - return nil, fmt.Errorf("creating ARM Role Definitions client: %w", err) - } - - return client, nil - }) - container.MustRegisterSingleton(func( httpClient httputil.HttpClient, userAgent httputil.UserAgent, diff --git a/cli/azd/pkg/account/credentials.go b/cli/azd/pkg/account/credentials.go index 944aa82e84f..6eda579a5ae 100644 --- a/cli/azd/pkg/account/credentials.go +++ b/cli/azd/pkg/account/credentials.go @@ -10,8 +10,6 @@ import ( "github.com/azure/azure-dev/cli/azd/pkg/auth" ) -type TokenCredentialForSubscription = azcore.TokenCredential - // SubscriptionCredentialProvider provides an [azcore.TokenCredential] configured // to use the tenant id that corresponds to the tenant the given subscription // is located in.