A Jenkins Plugin that supports authentication & authorization via Azure Active Directory.
-
Open
Azure Active Directory
, inProperties
, copy Directory ID, it will be used astenant
in Jenkins. -
Register an application in AAD, copy the
Application ID
, it will be used asClient ID
. -
In Application setting page, add a new Reply URL
http://{your_jenkins_host}/securityRealm/finishLogin
. Make sure variablejenkinsURL
set ashttp://{your_jenkins_host}
for the filejenkins.model.JenkinsLocationConfiguration.xml
in the$JENKINS_HOME
folder. -
In Application setting page, click
Keys
, generate a new key, copy thevalue
, it will be used asClient Secret
in Jenkins. -
In Application setting page, click
Required Permissions
and selectWindows Azure Active Directory
, then selectRead directory data
permissions in Application permissions section -
Click
Grant Permissions
. If you are not an admin in your tenant, please contact admin to grant the permissions which declared asrequire admin
inEnable Access
page. Wait for the permissions taking effects.
Click Manage Jenkins
in the left menu, then click Configure Global Security
, check Enable security
To enable Azure Authentication, check Azure Active Directory
and fill in the credential.
Click Verify Application
to make sure your input is valid.
To enable Azure Authentication, check Azure Active Directory Matrix-based security
A: You can disable the security from the config file (see https://wiki.jenkins.io/display/JENKINS/Disable+security)
Q: Why getting a error "insufficient privileges to complete the operation" even having granted the permission?
A: It takes rather long time for the privileges to take effect, which could be 10-20 minutes. So just wait for a while and try again.