-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #530 from AzureAD/allow-client_id-as-scope
Allow using client_id as scope. Needed by B2C.
- Loading branch information
Showing
3 changed files
with
30 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -884,6 +884,18 @@ def test_b2c_acquire_token_by_ropc(self): | |
scope=config["scopes"], | ||
) | ||
|
||
def test_b2c_allows_using_client_id_as_scope(self): | ||
# See also https://learn.microsoft.com/en-us/azure/active-directory-b2c/access-tokens#openid-connect-scopes | ||
config = self.get_lab_app_object(azureenvironment="azureb2ccloud") | ||
config["scopes"] = [config["appId"]] | ||
self._test_username_password( | ||
authority=self._build_b2c_authority("B2C_1_ROPC_Auth"), | ||
client_id=config["appId"], | ||
username="[email protected]", | ||
password=self.get_lab_user_secret("msidlabb2c"), | ||
scope=config["scopes"], | ||
) | ||
|
||
|
||
class WorldWideRegionalEndpointTestCase(LabBasedTestCase): | ||
region = "westus" | ||
|