MicrosoftIdpConfigFromPasswords class

Creates a new MicrosoftIdpConfig from keys on the passwords.yaml file.

This constructor requires that a Serverpod instance has already been initialized.

The following keys must be present in the passwords.yaml file:

  • microsoftClientId: The client ID from your Microsoft Entra ID application
  • microsoftClientSecret: The client secret from your Microsoft Entra ID application

The following key is optional:

  • microsoftTenant: The tenant ID or type (defaults to 'common' if not provided)

Example passwords.yaml:

microsoftClientId: 'your-microsoft-client-id'
microsoftClientSecret: 'your-microsoft-client-secret'
microsoftTenant: 'common'  # or 'organizations', 'consumers', or specific tenant ID
Inheritance

Constructors

MicrosoftIdpConfigFromPasswords({bool fetchProfilePhoto = true, MicrosoftAccountDetailsValidation microsoftAccountDetailsValidation = validateMicrosoftAccountDetails, GetExtraMicrosoftInfoCallback? getExtraMicrosoftInfoCallback})
Creates a new MicrosoftIdpConfigFromPasswords instance.

Properties

authorityHost String
The authority host for the Microsoft identity provider.
finalinherited
clientId String
The client ID from your Microsoft Entra ID (Azure AD) application.
finalinherited
clientSecret String
The client secret from your Microsoft Entra ID (Azure AD) application.
finalinherited
fetchProfilePhoto bool
Whether to automatically fetch and store user profile photos.
finalinherited
getExtraMicrosoftInfoCallback GetExtraMicrosoftInfoCallback?
Callback that can be used with the access token to extract additional information from Microsoft Graph API.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
microsoftAccountDetailsValidation MicrosoftAccountDetailsValidation
Validation function for Microsoft account details.
finalinherited
oauth2Config OAuth2PkceServerConfig
OAuth2 PKCE server config for Microsoft.
latefinalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tenant String
The tenant ID or tenant type for the application.
finalinherited
type Type
The type of the provider that this builder creates. Used to store the provider in the AuthConfig.
no setterinherited

Methods

build({required TokenManager tokenManager, required AuthUsers authUsers, required UserProfiles userProfiles}) MicrosoftIdp
Builds a new instance of the identity provider.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited