Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions sdk/identity/azure-identity-broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,6 @@ Microsoft Entra applications rely on redirect URIs to determine where to send th
ms-appx-web://Microsoft.AAD.BrokerPlugin/{client_id}
```

## Use the default account for sign-in

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.

```
cred = new InteractiveBrowserBrokerCredential(use_default_broker_account=True)
```

## Examples

### Authenticate with `InteractiveBrowserBrokerCredential`
Expand All @@ -64,6 +56,15 @@ credential = InteractiveBrowserBrokerCredential(parent_window_handle=current_win
client = BlobServiceClient(account_url, credential=credential)
```

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.

```python
cred = new InteractiveBrowserBrokerCredential(
parent_window_handle=current_window_handle,
use_default_broker_account=True
)
```

## Troubleshooting

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