From c09228679405693f99f1b018db6d27431f0e3e69 Mon Sep 17 00:00:00 2001 From: Andy Zheng Date: Thu, 23 Oct 2025 09:59:03 -0400 Subject: [PATCH 1/2] Add domainHint support to authorization request --- .../parameters/TokenCommandParameters.java | 2 ++ .../common/java/controllers/BaseController.java | 1 + .../microsoft/MicrosoftAuthorizationRequest.java | 15 +++++++++++++++ .../MicrosoftAuthorizationRequestTest.java | 7 +++++++ 4 files changed, 25 insertions(+) diff --git a/common4j/src/main/com/microsoft/identity/common/java/commands/parameters/TokenCommandParameters.java b/common4j/src/main/com/microsoft/identity/common/java/commands/parameters/TokenCommandParameters.java index 357d75cecf..46d3c61f24 100644 --- a/common4j/src/main/com/microsoft/identity/common/java/commands/parameters/TokenCommandParameters.java +++ b/common4j/src/main/com/microsoft/identity/common/java/commands/parameters/TokenCommandParameters.java @@ -69,6 +69,8 @@ public class TokenCommandParameters extends CommandParameters { private final String loginHint; + private final String domainHint; + private final List> extraOptions; public Set getScopes() { diff --git a/common4j/src/main/com/microsoft/identity/common/java/controllers/BaseController.java b/common4j/src/main/com/microsoft/identity/common/java/controllers/BaseController.java index 1acc0adc52..514ed80812 100644 --- a/common4j/src/main/com/microsoft/identity/common/java/controllers/BaseController.java +++ b/common4j/src/main/com/microsoft/identity/common/java/controllers/BaseController.java @@ -366,6 +366,7 @@ private void setBuilderProperties(@SuppressWarnings(WarningType.rawtype_warning) final MicrosoftStsAuthorizationRequest.Builder msBuilder = (MicrosoftStsAuthorizationRequest.Builder) builder; msBuilder .setLoginHint(interactiveTokenCommandParameters.getLoginHint()) + .setDomainHint(interactiveTokenCommandParameters.getDomainHint()) .setPrompt(interactiveTokenCommandParameters.getPrompt().toString()) .setPreferredAuthMethod(interactiveTokenCommandParameters.getPreferredAuthMethod()); final String installedCompanyPortalVersion = diff --git a/common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/MicrosoftAuthorizationRequest.java b/common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/MicrosoftAuthorizationRequest.java index f86dda1b55..846c339c81 100644 --- a/common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/MicrosoftAuthorizationRequest.java +++ b/common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/MicrosoftAuthorizationRequest.java @@ -75,6 +75,14 @@ public abstract class MicrosoftAuthorizationRequest