Skip to content

Do not carry authority port to the default instance discovery host #1052

Description

@bgavrilMS

Description

When an AAD authority uses a non-default port and its host is not in MSAL4J's trusted host set, instance discovery is redirected to the default trusted host. The authority's port is currently copied to that discovery endpoint.

For example, https://custom.example:8443/tenant produces an instance discovery endpoint at https://login.microsoftonline.com:8443/common/discovery/instance.

Expected behavior

Use the authority's port only when instance discovery targets the authority host itself. When discovery uses the default trusted host, use its default HTTPS port.

The original authority and its port should remain unchanged for authorization and token requests.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions