Attempts authentication using a managed identity that has been assigned to the deployment environment. This authentication type works in Azure VMs, App Service and Azure Functions applications, as well as the Azure Cloud Shell. More information about configuring managed identities can be found here: https://learn.microsoft.com/entra/identity/managed-identities-azure-resources/overview.
#include <managed_identity_credential.hpp>
◆ ~ManagedIdentityCredential()
ManagedIdentityCredential::~ManagedIdentityCredential |
( |
| ) |
|
|
overridedefault |
◆ ManagedIdentityCredential() [1/3]
ManagedIdentityCredential::ManagedIdentityCredential |
( |
std::string const & |
clientId = std::string() , |
|
|
Azure::Core::Credentials::TokenCredentialOptions const & |
options = Azure::Core::Credentials::TokenCredentialOptions() |
|
) |
| |
|
explicit |
- Parameters
-
clientId | Client ID. |
options | Options for token retrieval. |
◆ ManagedIdentityCredential() [2/3]
- Parameters
-
options | Options for token retrieval. |
◆ ManagedIdentityCredential() [3/3]
ManagedIdentityCredential::ManagedIdentityCredential |
( |
Azure::Core::Credentials::TokenCredentialOptions const & |
options | ) |
|
|
explicit |
- Parameters
-
options | Options for token retrieval. |
◆ GetToken()
Azure::Core::Credentials::AccessToken ManagedIdentityCredential::GetToken |
( |
Core::Credentials::TokenRequestContext const & |
tokenRequestContext, |
|
|
Core::Context const & |
context |
|
) |
| const |
|
override |
- Parameters
-
tokenRequestContext | A context to get the token in. |
context | A context to control the request lifetime. |
- Returns
- Authentication token.
- Exceptions
-
Azure::Core::Credentials::AuthenticationException | Authentication error occurred. |
The documentation for this class was generated from the following files: