Skip to content

Commit 752e292

Browse files
authored
fix: support both login.partner.microsoftonline.cn and login.chinacloudapi.cn for China cloud (backward compatibility) (#575)
1 parent b4b8bfc commit 752e292

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

apps/internal/oauth/ops/authority/authority.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ type jsonCaller interface {
4646
JSONCall(ctx context.Context, endpoint string, headers http.Header, qv url.Values, body, resp interface{}) error
4747
}
4848

49+
// For backward compatibility, accept both old and new China endpoints for a transition period.
4950
var aadTrustedHostList = map[string]bool{
5051
"login.windows.net": true, // Microsoft Azure Worldwide - Used in validation scenarios where host is not this list
51-
"login.partner.microsoftonline.cn": true, // Microsoft Azure China
52+
"login.partner.microsoftonline.cn": true, // Microsoft Azure China (new)
53+
"login.chinacloudapi.cn": true, // Microsoft Azure China (legacy, backward compatibility)
5254
"login.microsoftonline.de": true, // Microsoft Azure Blackforest
5355
"login-us.microsoftonline.com": true, // Microsoft Azure US Government - Legacy
5456
"login.microsoftonline.us": true, // Microsoft Azure US Government

0 commit comments

Comments
 (0)