You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the Microsoft Azure Attestation Management Client Library.
4
-
This package has been tested with Python 3.7+.
4
+
This package has been tested with Python 3.9+.
5
5
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
6
6
7
7
## _Disclaimer_
8
8
9
9
_Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For more information and questions, please refer to https://github.com/Azure/azure-sdk-for-python/issues/20691_
To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)
27
-
28
-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
29
-
Code samples for this package can be found at [Attestation Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
30
-
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
27
+
By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
31
28
29
+
-`AZURE_CLIENT_ID` for Azure client ID.
30
+
-`AZURE_TENANT_ID` for Azure tenant ID.
31
+
-`AZURE_CLIENT_SECRET` for Azure client secret.
32
32
33
-
## Examples
33
+
In addition, Azure subscription ID can be configured via environment variable `AZURE_SUBSCRIPTION_ID`.
34
+
35
+
With above configuration, client can be authenticated by following code:
34
36
35
-
### List Attestation Providers
36
37
```python
37
-
from azure.core.exceptions import ClientAuthenticationError
38
38
from azure.identity import DefaultAzureCredential
39
39
from azure.mgmt.attestation import AttestationManagementClient
The CredentialUnavailableError is a specific error type derived from ClientAuthenticationError. This error type is used to indicate that the credential can't authenticate in the current environment, due to missing required configuration or setup. This error is also used as an indication for chained credential types, such as DefaultAzureCredential and ChainedTokenCredential, that the chained credential should continue to attempt other credential types later in the chain.
54
-
55
-
### Permission issues
56
-
Service client calls that result in HttpResponseError with a StatusCode of 401 or 403 often indicate the caller doesn't have sufficient permissions for the specified API. Check the [service documentation](https://learn.microsoft.com/azure/attestation/) to determine which RBAC roles are needed for the specific request, and ensure the authenticated user or service principal have been granted the appropriate roles on the resource.
57
-
58
-
## Next Steps
59
-
60
-
If you encounter any bugs or have suggestions, please file an issue in the
-[Search Attestation Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com
0 commit comments