Language

ServiceClientFactory.CreateConfidential Method

Definition

Creates an instance of ServiceClient configured with confidential client authentication (SPN) and HTTP handlers.

public Microsoft.PowerPlatform.Management.ServiceClient CreateConfidential(string tenantId, string entraClientId, string clientSecret, string baseUrl = "https://api.powerplatform.com", string authScope = "https://api.powerplatform.com//.default");
member this.CreateConfidential : string * string * string * string * string -> Microsoft.PowerPlatform.Management.ServiceClient
Public Function CreateConfidential (tenantId As String, entraClientId As String, clientSecret As String, Optional baseUrl As String = "https://api.powerplatform.com", Optional authScope As String = "https://api.powerplatform.com//.default") As ServiceClient

Parameters

tenantId
String

Microsoft Entra Tenant ID.

entraClientId
String

This parameter is used to initialize the authentication provider for the client. Entra Client ID (also known as App ID) of the application as registered in the application registration portal (https://aka.ms/msal-net-register-app)

clientSecret
String

Client Secret for the application.

baseUrl
String

The base URL for the API. Default is "https://api.powerplatform.com".

authScope
String

Authentication scope for the API. Default is "https://api.powerplatform.com//.default".

Returns

Returns a new instance of ServiceClient.

Applies to