Skip to content

Commit 705070c

Browse files
authored
Added broker support for linux & wsl (#41624)
* Added broker support for linux & wsl * update * update * update * update * disable pypy for broker tests * update readme * update
1 parent 098d0c9 commit 705070c

File tree

6 files changed

+22
-7
lines changed

6 files changed

+22
-7
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44

55
### Features Added
66

7+
- Added broker support for Linux and WSL.
8+
79
### Breaking Changes
810

911
### Bugs Fixed
1012

1113
### Other Changes
1214

15+
- Python 3.8 is no longer supported. Please use Python version 3.9 or later.
16+
1317
## 1.3.0b1 (2024-11-05)
1418

1519
### Features Added
1620

17-
- Added broker on macOS support.
21+
- Added broker support for MacOS.
1822

1923
## 1.2.0 (2024-10-08)
2024

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ This package extends the [Azure Identity][azure_identity] library by providing s
44

55
| Broker | Minimum package version |
66
|-------------------------------------------|-------------------------|
7-
| [Company Portal][company_portal] on macOS | 1.3.0b1 |
87
| Web Account Manager (WAM) on Windows 10+ | 1.0.0 |
8+
| [Company Portal][company_portal] on macOS | 1.3.0b1 |
9+
| Web Account Manager (WAM) on WSL 2.4.13+ | 1.3.0b2 |
10+
| Broker on Linux | 1.3.0b2 |
911

1012
[Source code][source_code] | [Package (PyPI)][azure_identity_broker] | [API reference documentation][ref_docs] | [Microsoft Entra ID documentation][entra_id]
1113

@@ -37,8 +39,10 @@ Microsoft Entra applications rely on redirect URIs to determine where to send th
3739

3840
| Platform | Redirect URI |
3941
|-------------|-----------------------------------------------------------------------------------------------------------------------|
40-
| macOS | `msauth.com.msauth.unsignedapp://auth` for unsigned applications<br>`msauth.BUNDLE_ID://auth` for signed applications |
4142
| Windows 10+ | `ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id` |
43+
| macOS | `msauth.com.msauth.unsignedapp://auth` for unsigned applications<br>`msauth.BUNDLE_ID://auth` for signed applications |
44+
| WSL | `ms-appx-web://Microsoft.AAD.BrokerPlugin/your_client_id` |
45+
| Linux | `https://login.microsoftonline.com/common/oauth2/nativeclient` |
4246

4347
## Examples
4448

sdk/identity/azure-identity-broker/azure/identity/broker/_browser.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,8 @@ def _get_app(self, **kwargs: Any) -> msal.ClientApplication:
196196
instance_discovery=self._instance_discovery,
197197
enable_broker_on_windows=True,
198198
enable_broker_on_mac=True,
199+
enable_broker_on_linux=True,
200+
enable_broker_on_wsl=True,
199201
enable_pii_log=self._enable_support_logging,
200202
)
201203

@@ -231,6 +233,8 @@ def _disable_broker_on_app(self, **kwargs: Any) -> msal.ClientApplication:
231233
instance_discovery=self._instance_discovery,
232234
enable_broker_on_windows=False,
233235
enable_broker_on_mac=False,
236+
enable_broker_on_linux=False,
237+
enable_broker_on_wsl=False,
234238
enable_pii_log=self._enable_support_logging,
235239
)
236240

sdk/identity/azure-identity-broker/setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@
4545
"Programming Language :: Python",
4646
"Programming Language :: Python :: 3 :: Only",
4747
"Programming Language :: Python :: 3",
48-
"Programming Language :: Python :: 3.8",
4948
"Programming Language :: Python :: 3.9",
5049
"Programming Language :: Python :: 3.10",
5150
"Programming Language :: Python :: 3.11",
5251
"Programming Language :: Python :: 3.12",
52+
"Programming Language :: Python :: 3.13",
5353
"License :: OSI Approved :: MIT License",
5454
],
5555
zip_safe=False,
@@ -60,9 +60,9 @@
6060
package_data={
6161
"pytyped": ["py.typed"],
6262
},
63-
python_requires=">=3.8",
63+
python_requires=">=3.9",
6464
install_requires=[
6565
"azure-identity<2.0.0,>=1.18.0",
66-
"msal[broker]>=1.31,<2",
66+
"msal[broker]>=1.33.0b1,<2",
6767
],
6868
)

sdk/identity/azure-identity-broker/tests/test_broker.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
import msal
1515

1616

17-
@pytest.mark.skipif(not sys.platform.startswith("win"), reason="tests Windows-specific behavior")
17+
@pytest.mark.skipif(
18+
sys.platform.startswith("linux"), reason="linux requires manual setup to install InTune to make it work"
19+
)
1820
def test_interactive_browser_broker_cred():
1921
cred = InteractiveBrowserBrokerCredential()
2022
assert cred._get_app()._enable_broker

tools/azure-sdk-tools/ci_tools/functions.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"azure-servicebus": "pypy",
5353
"azure-ai-projects": "pypy",
5454
"azure-ai-agents": "pypy",
55+
"azure-identity-broker": "pypy",
5556
}
5657

5758
omit_regression = (

0 commit comments

Comments
 (0)