IPowerPlatformTokenProvider
- Namespace:
PPDS.Auth.Credentials - Assembly:
PPDS.Auth - Kind: Interface
- Implements:
IDisposable
Summary
Provides access tokens for Power Platform REST APIs (Power Apps, Power Automate, etc.).
Unlike PPDS.Auth.Credentials.ICredentialProvider which creates ServiceClient for Dataverse,
this interface acquires tokens for the Power Platform management APIs.
Members
Methods
GetFlowApiTokenAsync
Task<PowerPlatformToken> GetFlowApiTokenAsync(CancellationToken cancellationToken)
Acquires an access token for the Flow API using the correct service.powerapps.com scope. Use this method for Flow API and Connections API operations, which require the service.powerapps.com audience rather than api.flow.microsoft.com.
-
Param
cancellationToken: Cancellation token. -
Returns: A valid access token with service.powerapps.com audience.
GetPowerAppsTokenAsync
Task<PowerPlatformToken> GetPowerAppsTokenAsync(CancellationToken cancellationToken)
Acquires an access token for the Power Apps API. Resource: https://api.powerapps.com (varies by cloud).
-
Param
cancellationToken: Cancellation token. -
Returns: A valid access token.
GetPowerAutomateTokenAsync
Task<PowerPlatformToken> GetPowerAutomateTokenAsync(CancellationToken cancellationToken)
Acquires an access token for the Power Automate (Flow) API. Resource: https://api.flow.microsoft.com (varies by cloud).
-
Param
cancellationToken: Cancellation token. -
Returns: A valid access token.
GetTokenForResourceAsync
Task<PowerPlatformToken> GetTokenForResourceAsync(string resource, CancellationToken cancellationToken)
Acquires an access token for the specified Power Platform resource.
-
Param
resource: The resource URL (e.g., https://api.powerapps.com). -
Param
cancellationToken: Cancellation token. -
Returns: A valid access token.