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

Assign Managed Identity as an Admin or API user #131

Closed
CCHV-GitHub opened this issue Jun 1, 2023 · 2 comments
Closed

Assign Managed Identity as an Admin or API user #131

CCHV-GitHub opened this issue Jun 1, 2023 · 2 comments
Assignees
Labels
help wanted Extra attention is needed

Comments

@CCHV-GitHub
Copy link

CCHV-GitHub commented Jun 1, 2023

I opened a discussion around how I might be able to achieve my goal, however I thought it might be worthwhile to open a feature request.

Can we allow Managed Identities to use the admin only API tools?

I have been trying to use an automation account managed identity to add VNETs to a Block, but the response i get is only admins can use this API, and it seems there is no way to add my managed identity to the admins list either, so I'm stuck.

@DCMattyG
Copy link
Contributor

DCMattyG commented Jun 1, 2023

Hi @CCHV-GitHub, apologies for the delayed response, I'm actually OOO this week.

You can indeed add Managed Identities and Service principals as IPAM Admins. Though you cannot do this through the UI, you can do it via API.

Use a POST to /api/admin/admins like in the docs:

image

Please remember that the ID is the Object ID of the Managed Identity. For the name & email you can choose whatever you'd like.

Hope that helps you out, please let me know if you have any issues implementing this!

@DCMattyG DCMattyG self-assigned this Jun 1, 2023
@DCMattyG DCMattyG added the help wanted Extra attention is needed label Jun 1, 2023
@CCHV-GitHub
Copy link
Author

Thanks for the info, i tried this earlier but it failed. Have just revisited and realised I forgot to put the content-type in the API call. Its working now, although I should have set myself as admin first, as now the only admin is the managed identity.

I can fix that one on my own though. Thanks for the help, you can close this now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants