AppTokenProvider Class
Public token source backed by the credentials configured on an App.
Constructor
AppTokenProvider(token_manager: TokenManager, cloud: CloudEnvironment = CloudEnvironment(login_endpoint='https://login.microsoftonline.com', login_tenant='botframework.com', bot_scope='https://api.botframework.com/.default', agent_bot_scope='https://botapi.skype.com/.default', token_service_url='https://token.botframework.com', openid_metadata_url='https://login.botframework.com/v1/.well-known/openidconfiguration', token_issuer='https://api.botframework.com', graph_scope='https://graph.microsoft.com/.default'))
Parameters
| Name | Description |
|---|---|
|
token_manager
Required
|
|
|
cloud
|
Default value: CloudEnvironment(login_endpoint='https://login.microsoftonline.com', login_tenant='botframework.com', bot_scope='https://api.botframework.com/.default', agent_bot_scope='https://botapi.skype.com/.default', token_service_url='https://token.botframework.com', openid_metadata_url='https://login.botframework.com/v1/.well-known/openidconfiguration', token_issuer='https://api.botframework.com', graph_scope='https://graph.microsoft.com/.default')
|
Methods
| get_agentic_app_token |
Acquire an app-only token for an agentic app. |
| get_agentic_user_token |
Acquire a token carrying an agentic user identity. |
| get_app_token |
Acquire an app-only token. |
get_agentic_app_token
Acquire an app-only token for an agentic app.
async get_agentic_app_token(scope: str, agentic_app_id: str, tenant_id: str | None = None) -> TokenProtocol | None
Parameters
| Name | Description |
|---|---|
|
scope
Required
|
|
|
agentic_app_id
Required
|
|
|
tenant_id
|
Default value: None
|
get_agentic_user_token
Acquire a token carrying an agentic user identity.
async get_agentic_user_token(scope: str | None, agentic_app_id: str, agentic_user_id: str, tenant_id: str | None = None) -> TokenProtocol | None
Parameters
| Name | Description |
|---|---|
|
scope
Required
|
|
|
agentic_app_id
Required
|
|
|
agentic_user_id
Required
|
|
|
tenant_id
|
Default value: None
|
get_app_token
Acquire an app-only token.
async get_app_token(scope: str | None = None, tenant_id: str | None = None) -> TokenProtocol | None
Parameters
| Name | Description |
|---|---|
|
scope
|
Default value: None
|
|
tenant_id
|
Default value: None
|