Skip to content

Commit 4348985

Browse files
authored
Update default broker account sample (#35003)
* Update default broker account sample * Update variable name to match previous code sample
1 parent 4ed19c3 commit 4348985

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

sdk/identity/azure-identity-broker/README.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,6 @@ Microsoft Entra applications rely on redirect URIs to determine where to send th
3838
ms-appx-web://Microsoft.AAD.BrokerPlugin/{client_id}
3939
```
4040

41-
## Use the default account for sign-in
42-
43-
When the `use_default_broker_account` argument is set to `True`, the credential will attempt to silently use the default broker account. If using the default account fails, the credential will fall back to interactive authentication.
44-
45-
```
46-
cred = new InteractiveBrowserBrokerCredential(use_default_broker_account=True)
47-
```
48-
4941
## Examples
5042

5143
### Authenticate with `InteractiveBrowserBrokerCredential`
@@ -64,6 +56,15 @@ credential = InteractiveBrowserBrokerCredential(parent_window_handle=current_win
6456
client = BlobServiceClient(account_url, credential=credential)
6557
```
6658

59+
To bypass the account selection dialog and use the account currently signed into the operating system, set the `use_default_broker_account` argument to `True`. The credential will attempt to silently use the default broker account. If using the default account fails, the credential will fall back to interactive authentication.
60+
61+
```python
62+
credential = new InteractiveBrowserBrokerCredential(
63+
parent_window_handle=current_window_handle,
64+
use_default_broker_account=True
65+
)
66+
```
67+
6768
## Troubleshooting
6869

6970
See the Azure Identity [troubleshooting guide][troubleshooting_guide] for details on how to diagnose various failure scenarios.

0 commit comments

Comments
 (0)