Suoranta.EnterpriseLib.Web - Developer API

AzureServicePrincipalSqlConnectionElement Class

When using this class, SqlConnection object must be manually configured with
C#
var credentialOptions = new DefaultAzureCredentialOptions
{
    ManagedIdentityClientId = [value from instance of this class]
};
var credential = new DefaultAzureCredential(credentialOptions);
var token = credential.GetToken(
    new Azure.Core.TokenRequestContext("https://database.windows.net/.default".WrapToArray())
);
connection.AccessToken = token.Token;

Namespace:  Suoranta.EnterpriseLib.Types.Configuration
Assembly:  Suoranta.EnterpriseLib.Base (in Suoranta.EnterpriseLib.Base.dll)

Syntax


public class AzureServicePrincipalSqlConnectionElement : AzureSqlConnectionElement

Inheritance Hierarchy


Object
  ConfigurationElement
    Suoranta.EnterpriseLib.Types.Configuration..::..ConnectionElement
      Suoranta.EnterpriseLib.Types.Configuration..::..AzureSqlConnectionElement
        Suoranta.EnterpriseLib.Types.Configuration..::..AzureServicePrincipalSqlConnectionElement