Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plan script shall fail if Policy assignments can not be read #138

Closed
artisticcheese opened this issue Jan 26, 2023 · 6 comments · Fixed by #145
Closed

Plan script shall fail if Policy assignments can not be read #138

artisticcheese opened this issue Jan 26, 2023 · 6 comments · Fixed by #145
Labels
bug Something isn't working documentation Improvements or additions to documentation
Milestone

Comments

@artisticcheese
Copy link
Contributor

Hello,

I'm having weird issue with reading policy assignments after they are created on first run with the same SPN which created it.
Plan script shall fail instead of continuing execution in CI/CD in such cases.
Is there a bug in a code or how do I troubleshoot this RBAC issue which shall not be there (same SPN created assignment on first run)
image

@techlake techlake added the enhancement New feature or request label Jan 26, 2023
@techlake techlake added this to the V7 milestone Jan 26, 2023
@techlake
Copy link
Contributor

Permissions are documented here: https://github.com/Azure/enterprise-azure-policy-as-code/blob/main/Docs/ci-cd-pipeline.md#ms-graph-permissions

In rare circumstances this error is not an error (it happens if a previous role assignment failed). I will add code to surface the error a second time at the end of the CI/CD step and clarify the error message with additional information.

@artisticcheese
Copy link
Contributor Author

artisticcheese commented Jan 26, 2023

I think documentation need to have very details steps how to do Graph permissions step by step. For example which application I'm supposed to be providing MS Graph permissions?
There is generic documentation already but I think walkthrough would still be required as a lot of DevOps personnel frequently removed from Azure AD administration and identity management in general. In our case it's managed by completely different part of the company and reliance on MS Graph increase complexity of implementation of this project on another level.

@artisticcheese
Copy link
Contributor Author

Is there an option just to forego somehow assignment management and do assignment management manually rather the automatically. It's worth for me to have one time manual steps rather then to deal with MS Graph.

@techlake
Copy link
Contributor

Nope, always there. MSGraph is easy. Just follow the 3 linked steps in the documentation

@martyh888
Copy link

I think what is missing in the docs is the following from Docs/ci-cd-pipeline.md

sc-pac-dev also requires MS Graph Permissions (basically anything that is being used to query the Roles)

image

@techlake
Copy link
Contributor

Thank you for finding this bug and a solution. I'll fix this soon. I tagged this issue with Documentation

@techlake techlake added bug Something isn't working documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jan 30, 2023
@techlake techlake mentioned this issue Feb 3, 2023
@techlake techlake linked a pull request Feb 3, 2023 that will close this issue
@techlake techlake closed this as completed Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants