jenkinsci / azure-ad-plugin

Authentication and Authorization with Azure AD
https://plugins.jenkins.io/azure-ad/
MIT License
29 stars 57 forks source link

Unable to add new user under Authorization "Azure Active Directory Matrix-based security" #561

Closed abs2310 closed 5 months ago

abs2310 commented 5 months ago

Jenkins and plugins versions report

Jenkins - Microsoft Entra ID (previously Azure AD) Plugin issue - Unable to add new user to grant access ```Jenkins: 2.440.2 OS: Linux - 6.5.0-1016-aws Java: 21.0.2 - Private Build (OpenJDK 64-Bit Server VM) --- ansicolor:1.0.4 ant:497.v94e7d9fffa_b_9 antisamy-markup-formatter:162.v0e6ec0fcfcf6 apache-httpcomponents-client-4-api:4.5.14-208.v438351942757 asm-api:9.7-33.v4d23ef79fcc8 authentication-tokens:1.53.v1c90fd9191a_b_ azure-ad:471.vdfa_2441c67a_f azure-sdk:157.v855da_0b_eb_dc2 backup:1.6.1 bootstrap5-api:5.3.3-1 bouncycastle-api:2.30.1.77-225.v26ea_c9455fd9 branch-api:2.1152.v6f101e97dd77 build-timeout:1.32 caffeine-api:3.1.8-133.v17b_1ff2e0599 checks-api:2.2.0 cloudbees-folder:6.901.vb_4c7a_da_75da_3 command-launcher:107.v773860566e2e commons-lang3-api:3.13.0-62.v7d18e55f51e2 commons-text-api:1.11.0-95.v22a_d30ee5d36 conditional-buildstep:1.4.3 config-file-provider:968.ve1ca_eb_913f8c copyartifact:722.v0662a_9b_e22a_c credentials:1337.v60b_d7b_c7b_c9f credentials-binding:657.v2b_19db_7d6e6d delivery-pipeline-plugin:1.4.2 display-url-api:2.200.vb_9327d658781 durable-task:550.v0930093c4b_a_6 echarts-api:5.5.0-1 embeddable-build-status:467.v4a_954796e45d external-monitor-job:215.v2e88e894db_f8 favorite:2.208.v91d65b_7792a_c font-awesome-api:6.5.1-3 git:5.2.1 git-client:4.7.0 git-parameter:0.9.19 gitlab-api:5.3.0-91.v1f9a_fda_d654f gitlab-oauth:1.19 gitlab-plugin:1.8.0 gradle:2.10 gson-api:2.10.1-15.v0d99f670e0a_7 handy-uri-templates-2-api:2.1.8-30.v7e777411b_148 htmlpublisher:1.33 instance-identity:185.v303dc7c645f9 ionicons-api:70.v2959a_b_74e3cf jackson2-api:2.17.0-379.v02de8ec9f64c jakarta-activation-api:2.1.3-1 jakarta-mail-api:2.1.3-1 javadoc:243.vb_b_503b_b_45537 javax-activation-api:1.2.0-6 javax-mail-api:1.6.2-9 jaxb:2.3.9-1 jdk-tool:73.vddf737284550 jersey2-api:2.42-147.va_28a_44603b_d5 jjwt-api:0.11.5-112.ve82dfb_224b_a_d joda-time-api:2.12.7-29.v5a_b_e3a_82269a_ jquery:1.12.4-1 jquery3-api:3.7.1-2 jsch:0.2.16-86.v42e010d9484b_ json-api:20240303-41.v94e11e6de726 json-path-api:2.9.0-58.v62e3e85b_a_655 junit:1265.v65b_14fa_f12f0 mailer:472.vf7c289a_4b_420 matrix-auth:3.2.2 matrix-project:822.824.v14451b_c0fd42 maven-plugin:3.23 mina-sshd-api-common:2.12.1-101.v85b_e08b_780dd mina-sshd-api-core:2.12.1-101.v85b_e08b_780dd node-iterator-api:55.v3b_77d4032326 nodejs:1.6.1 okhttp-api:4.11.0-172.vda_da_1feeb_c6e pam-auth:1.10 parameterized-trigger:787.v665fcf2a_830b_ pipeline-build-step:540.vb_e8849e1a_b_d8 pipeline-graph-analysis:216.vfd8b_ece330ca_ pipeline-groovy-lib:704.vc58b_8890a_384 pipeline-input-step:491.vb_07d21da_1a_fb_ pipeline-milestone-step:119.vdfdc43fc3b_9a_ pipeline-model-api:2.2188.v26e255fd2984 pipeline-model-definition:2.2188.v26e255fd2984 pipeline-model-extensions:2.2188.v26e255fd2984 pipeline-rest-api:2.34 pipeline-stage-step:312.v8cd10304c27a_ pipeline-stage-tags-metadata:2.2188.v26e255fd2984 pipeline-stage-view:2.34 plain-credentials:179.vc5cb_98f6db_38 plugin-util-api:4.1.0 postbuild-task:1.9 publish-over:0.22 publish-over-ssh:1.25 pubsub-light:1.18 rake:1.8.0 resource-disposer:0.23 run-condition:1.7 scm-api:689.v237b_6d3a_ef7f script-security:1335.vf07d9ce377a_e snakeyaml-api:2.2-111.vc6598e30cc65 ssh-agent:367.vf9076cd4ee21 ssh-credentials:337.v395d2403ccd4 sshd:3.322.v159e91f6a_550 structs:337.v1b_04ea_4df7c8 terraform:1.0.10 timestamper:1.26 token-macro:400.v35420b_922dcb_ trilead-api:2.142.v748523a_76693 variant:60.v7290fc0eb_b_cd workflow-aggregator:596.v8c21c963d92d workflow-api:1291.v51fd2a_625da_7 workflow-basic-steps:1049.v257a_e6b_30fb_d workflow-cps:3894.vd0f0248b_a_fc4 workflow-durable-task-step:1336.v768003e07199 workflow-job:1400.v7fd111b_ec82f workflow-multibranch:773.vc4fe1378f1d5 workflow-scm-step:427.v4ca_6512e7df1 workflow-step-api:657.v03b_e8115821b_ workflow-support:896.v175a_a_9c5b_78f ws-cleanup:0.45 ```

What Operating System are you using (both controller, and any agents involved in the problem)?

Operating System: Ubuntu 22.04.1 running on arm64 Linux ~22.04.1-Ubuntu SMP Wed Mar 13 20:57:51 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Reproduction steps

  1. Go to Manage Jenkins
  2. Click on Security
  3. Go to Authorization section "Azure Active Directory Matrix-based security" is selected
  4. Click on the Add button below the Authorization section.
  5. The drop down which used to allow adding user is not showing up instead it shows error on the Browser Console "table.js:30 Uncaught TypeError: Cannot read properties of undefined (reading 'forEach') at HTMLButtonElement. (table.js:30:24)"

Expected Results

Show a textbox to search and allow adding Office 365 Azure Users to grant permission

Actual Results

No text box is shown

Anything else?

Browser Console "table.js:30 Uncaught TypeError: Cannot read properties of undefined (reading 'forEach') at HTMLButtonElement. (table.js:30:24)"

Are you interested in contributing a fix?

No response

backphlip commented 5 months ago

we're facing the same issue after updating Jenkins from v2.426.3 to v2.440.2 and azure-ad-plugin from v457.vf85d61f83b_26 to v471.vdfa_2441c67a_f

timja commented 5 months ago

Likely https://github.com/jenkinsci/azure-ad-plugin/pull/540

timja commented 5 months ago

fix should be released soon, see https://github.com/jenkinsci/azure-ad-plugin/pull/562