Skip to content

Commit d6a5df0

Browse files
Merge pull request #313102 from mrm9084/EntraIdPython
App Config Entra Id usage Python
2 parents d937632 + 3835077 commit d6a5df0

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

articles/azure-app-configuration/concept-enable-rbac.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,43 @@ const client = new AppConfigurationClient(myStoreEndpoint, new DefaultAzureCrede
224224
});
225225
```
226226

227+
### [Python](#tab/python)
228+
#### Python configuration provider
229+
230+
If your application uses the following package, audience can be configured by passing the keyword `audience` to the `load` method. Use version **2.4.0** or later of the following package.
231+
- `azure-appconfiguration-provider`
232+
233+
The following code snippet demonstrates how to load Azure App Configuration in a Python application with a cloud-specific audience.
234+
235+
```python
236+
from azure.appconfiguration.provider import load
237+
from azure.identity import DefaultAzureCredential
238+
239+
config = load(
240+
endpoint=myStoreEndpoint,
241+
credential=DefaultAzureCredential(),
242+
audience="{Cloud specific audience here}",
243+
)
244+
```
245+
246+
#### Azure SDK for Python
247+
248+
If your application uses the following package, audience can be configured by passing the `audience` keyword to the `AzureAppConfigurationClient` constructor. Use version **1.8.0** or later of the following package.
249+
- `azure-appconfiguration`
250+
251+
The following code snippet demonstrates how to instantiate a configuration client with a cloud-specific audience.
252+
253+
```python
254+
from azure.appconfiguration import AzureAppConfigurationClient
255+
from azure.identity import DefaultAzureCredential
256+
257+
client = AzureAppConfigurationClient(
258+
myStoreEndpoint,
259+
DefaultAzureCredential(),
260+
audience="{Cloud specific audience here}",
261+
)
262+
```
263+
227264
### [Go](#tab/go)
228265

229266
To configure the Entra ID audience, import the following packages in your Go application first:

0 commit comments

Comments
 (0)