Closed BenjaminBarnel closed 3 years ago
The ssh one is a known issue, https://github.com/jenkinsci/azure-ad-plugin/issues/128
I assume it's something in https://github.com/jenkinsci/azure-ad-plugin/pull/125 but I can't see anything jumping out at me
I don't know what's going on for SSH as it works just fine for me: https://github.com/jenkinsci/azure-ad-plugin/issues/128
What permissions does your Jenkins app registration have?
See recommended ones at https://github.com/jenkinsci/azure-ad-plugin#setup-azure-ad-permissions-optional-but-recommended
Hello,
All seems fine on my side.
On Azure :
And Jenkins MATRIX
Can you confirm you've downloaded a fresh version of the CLI on 2.289.1 and not a stored version from a previous version of Jenkins?
yes right : ssh -l jenkins -p 50002 blibli.qapa.fr version 2.289.1
Any more details you can share about how it's setup?
Are you using project based Authorization?
Anything interesting you can think of?
What type of job is it? Can you provide a jobdsl snippet or config.xml?
1./ Perhaps one yes, wen I use Test on pluggin I have this error :
Same error with Object ID
2./ When Job failed Logs is :
The recommended git tool is: git
using credential xxxx
Cloning the remote Git repository
Cloning with configured refspecs honoured and without tags
Cloning repository https://github.com/xx/xx.git
git init /home/jenkins/HomeJenkinsSlave/workspace/xxxxx # timeout=10
Fetching upstream changes from https://github.com/xx/xx.git
git --version # timeout=10
git --version # 'git version 2.17.1'
using GIT_ASKPASS to set credentials Organisation Plugin
git fetch --no-tags --progress -- https://github.com/xxx/xxx.git +refs/heads/xxxx:refs/remotes/origin/xxxx # timeout=10
Avoid second fetch
Checking out Revision 50c78b591f40c02b40eaf376c129319be81142fc (xxxx)
git config remote.origin.url https://github.com/xxxx/xxxx.git # timeout=10
git config --add remote.origin.fetch +refs/heads/xxxx/refs/remotes/origin/xxxx9 # timeout=10
git config core.sparsecheckout # timeout=10
git checkout -f 50c78b591f40c02b40eaf376c129319be81142fc # timeout=10
Commit message: "blabla"
First time build. Skipping changelog.
git --version # timeout=10
git --version # 'git version 2.17.1'
com.microsoft.graph.http.GraphServiceException: Error code: Authorization_RequestDenied
Error message: Insufficient privileges to complete the operation.
GET https://graph.microsoft.com/v1.0/users/Benjamin%20Barnel
SdkVersion : graph-java/v3.4.0
403 : Forbidden
[...]
[Some information was truncated for brevity, enable debug logging for more details]
Display name isn't a upn or object id, but you would get not found not insufficient permissions if that was the issue.
It sounds like there's something wrong with your app registration,
One suggestion would be to create a new one and step through the guide at https://github.com/jenkinsci/azure-ad-plugin#setup-in-azure-active-directory to see if that fixes it.
ok i will
We are hitting the same problem after the upgrade. Please let me know if re-registering the app help here?
@BenjaminBarnel
It's not a plugin issue. It looks like in the new plugin version the "Graph API permissions" are mandatory. In the Microsoft Graph you need to give "Application permissions" for 'User.Read.All', 'Group.Read.All' and 'People.Read'
After I done that, everything works as before and I didn't get that error.
Hello .. juste try It with new configuration and all application permissions .. and don't work on my side Wit.h GRAPH
But I juste install the last version 171.v9ef20c94d336 and now we have the possibility to disable Graph api permissions. This option solved my issue.
Im facing the same issue and the "Disable graph Integration" fixed it, yet I can't manage to enable that option through the configuration-as-code plugin, I added the snippet as this:
securityRealm:
azure:
cacheDuration: 36000
clientId: ****
...
...
disableGraphIntegration: true
But when the configuration is loaded the checkbox is not checked. Was anyone able to make it work with cas plugin?
Thanks!
best to create a new issue, from a quick read of the code it all looks correct though
Thanks for the quick reply @timja, after checking again, it seems it was related to an error on our end. I will create a new issue if it keeps happening.
When i upscale AZURE AD pluggin from 155.v745ce80af7ea to 158.v437429002c6b We have many permissions problem :
Version report
Jenkins and plugins versions report:
Operating System
Reproduction steps
Upscale Azure AD pluggin from 155.v745ce80af7ea TO 158.v437429002c6b
GitHub has been notified of this commit’s build result
com.microsoft.graph.http.GraphServiceException: Error code: Authorization_RequestDenied Error message: Insufficient privileges to complete the operation.
GET https://graph.microsoft.com/v1.0/users/xxxxxxx SdkVersion : graph-java/v3.4.0
403 : Forbidden [...]
[Some information was truncated for brevity, enable debug logging for more details] at com.microsoft.graph.http.GraphServiceException.createFromResponse(GraphServiceException.java:419) at com.microsoft.graph.http.GraphServiceException.createFromResponse(GraphServiceException.java:378) at com.microsoft.graph.http.CoreHttpProvider.handleErrorResponse(CoreHttpProvider.java:503) at com.microsoft.graph.http.CoreHttpProvider.processResponse(CoreHttpProvider.java:432) at com.microsoft.graph.http.CoreHttpProvider.sendRequestInternal(CoreHttpProvider
workaround :
I have rollback plugin to previous version 155.v745ce80af7ea and these 3 issues are solved.