AuthProfile
- Namespace:
PPDS.Auth.Profiles - Assembly:
PPDS.Auth - Kind: Class
Summary
An authentication profile containing credentials and environment binding.
Members
Methods
Clone
AuthProfile Clone()
Creates a deep copy of this profile.
ToString
string ToString()
Returns a string representation of the profile.
Validate
void Validate()
Validates that the profile has required fields for its auth method.
Properties
ApplicationId
string ApplicationId { get; set; }
Gets or sets the application (client) ID. Required for service principal authentication.
AuthMethod
AuthMethod AuthMethod { get; set; }
Gets or sets the authentication method.
Authority
string Authority { get; set; }
Gets or sets the authority URL for authentication. Full URL like "https://login.microsoftonline.com/\{tenantId\}".
CertificatePath
string CertificatePath { get; set; }
Gets or sets the certificate file path. For CertificateFile authentication.
CertificateStoreLocation
string CertificateStoreLocation { get; set; }
Gets or sets the certificate store location. For CertificateStore authentication. Default: CurrentUser
CertificateStoreName
string CertificateStoreName { get; set; }
Gets or sets the certificate store name. For CertificateStore authentication. Default: My
CertificateThumbprint
string CertificateThumbprint { get; set; }
Gets or sets the certificate thumbprint. For CertificateStore authentication.
Cloud
CloudEnvironment Cloud { get; set; }
Gets or sets the cloud environment.
CreatedAt
DateTimeOffset CreatedAt { get; set; }
Gets or sets when the profile was created.
DisplayIdentifier
string DisplayIdentifier { get; }
Gets the display identifier (always includes index, e.g., "[1] MyProfile" or "[1]").
Environment
EnvironmentInfo Environment { get; set; }
Gets or sets the bound environment. Null for universal profiles (no environment selected).
HasEnvironment
bool HasEnvironment { get; }
Gets whether this profile has an environment bound.
HasName
bool HasName { get; }
Gets whether this profile has a name.
HomeAccountId
string HomeAccountId { get; set; }
Gets or sets the MSAL home account identifier. Format: {objectId}.{tenantId} - uniquely identifies the account+tenant for token cache lookup.
IdentityDisplay
string IdentityDisplay { get; }
Gets the identity string for display (username or application ID).
Index
int Index { get; set; }
Gets or sets the profile index (1-based, assigned on creation).
LastUsedAt
Nullable<DateTimeOffset> LastUsedAt { get; set; }
Gets or sets when the profile was last used.
Name
string Name { get; set; }
Gets or sets the profile name (optional, max 30 characters). Null for unnamed profiles (reference by index only).
ObjectId
string ObjectId { get; set; }
Gets or sets the Entra ID Object ID (user or service principal). Populated after successful authentication.
Puid
string Puid { get; set; }
Gets or sets the user's PUID from the JWT 'puid' claim.
TenantId
string TenantId { get; set; }
Gets or sets the tenant ID. Required for app-based authentication.
Username
string Username { get; set; }
Gets or sets the username for device code or password auth. Populated after successful authentication.