jenkinsci / jenkinsci/active-directory-plugin

[JENKINS-75010] SecurityRealm Redirect URI issue azure-ad

Open
#668 0 comments 0 reactions 0 assignees View on GitHub
component:active-directory-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
53
Forks
115
PR merge metrics
No merged PRs in 30d

Description

Hi,

I am having a Redirect URI issue when I update the Jenkins version from Jenkins 2.462.3 to Jenkins 2.479.2 LTS.

Jenkins added port ":8080" to the system configuration, so I am getting the below error.

AADSTS50011: The redirect URI 'https://{your_jenkins_host}:8080/securityRealm/finishLogin' specified in the request does not match the redirect URIs configured for the application ''. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to [Error AADSTS50011 the redirect URI does not match the redirect URIs configured for the application | Microsoft Learn|https://aka.ms/redirectUriMismatchError] to learn more about how to fix this.


Microsoft Entra ID (previously Azure AD)



  1. Add a new Reply URL https://\{your_jenkins_host}/securityRealm/finishLogin. Make sure "Jenkins URL" (Manage Jenkins => Configure System) is set to the same value as https://\{your_jenkins_host}{}.

---
Originally reported by johndevopsus, imported from: SecurityRealm Redirect URI issue azure-ad


  • assignee: fbelzunc
  • status: Open
  • priority: Major
  • component(s): active-directory-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

Raw content of original issue

Hi,

I am having a Redirect URI issue when I update the Jenkins version from Jenkins 2.462.3 to Jenkins 2.479.2 LTS.

Jenkins added port ":8080" to the system configuration, so I am getting the below error.

AADSTS50011: The redirect URI 'https://{your_jenkins_host}:8080/securityRealm/finishLogin' specified in the request does not match the redirect URIs configured for the application ''. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to [Error AADSTS50011 the redirect URI does not match the redirect URIs configured for the application | Microsoft Learn|https://aka.ms/redirectUriMismatchError] to learn more about how to fix this.


Microsoft Entra ID (previously Azure AD)



  1. Add a new Reply URL https://\{your_jenkins_host}/securityRealm/finishLogin. Make sure "Jenkins URL" (Manage Jenkins => Configure System) is set to the same value as https://\{your_jenkins_host}{}.


environment

```
Jenkins setup:

Jenkins: 2.462.3

OS: Windows Server 2022 - 10.0

Java: 17.0.7 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)

Office-365-Connector:5.0.0

active-directory:2.38

authentication-tokens:1.119.v50285141b_7e1

azure-ad:531.v13107da_f2635

azure-cli:0.9

azure-credentials:343.vd80f9c4859df

azure-credentials-ext:1.0

azure-sdk:191.v53ec8913ee10

javadoc:280.v050b_5c849f69

javax-activation-api:1.2.0-7

javax-mail-api:1.6.2-10

jaxb:2.3.9-1

jdk-tool:80.v8a_dee33ed6f0
```

Contributor guide

Open the contributing guide

Research direction

Start with the active-directory plugin's SecurityRealm handling for the /securityRealm/finishLogin redirect and review how the Jenkins URL is used after the Jenkins version upgrade. Reproduce the Azure AD redirect mismatch with the reported versions and verify that the generated URI matches the configured Reply URL.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, java
Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.