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

AdministrativeUnits Not showing within Azure Role for Role #80

Open
felixguerrero12 opened this issue Jul 16, 2024 · 1 comment
Open

Comments

@felixguerrero12
Copy link

Bloodhound entry related to the Azure Role:
{"kind":"AZRole","data":{"id":"729827e3-9c14-49f7-bb1b-9608f156bbb8","description":"Can reset passwords for non-administrators and Helpdesk Administrators.","displayName":"Helpdesk Administrator","isBuiltIn":true,"isEnabled":true,"resourceScopes":["/"],"rolePermissions":[{"allowedResourceActions":["microsoft.azure.serviceHealth/allEntities/allTasks","microsoft.azure.supportTickets/allEntities/allTasks","microsoft.directory/bitlockerKeys/key/read","microsoft.directory/deviceLocalCredentials/standard/read","microsoft.directory/users/invalidateAllRefreshTokens","microsoft.directory/users/password/update","microsoft.office365.serviceHealth/allEntities/allTasks","microsoft.office365.supportTickets/allEntities/allTasks","microsoft.office365.webPortal/allEntities/standard/read"]}],"templateId":"729827e3-9c14-49f7-bb1b-9608f156bbb8","version":"1","tenantId":"2e0d024c-5e44-47f7-b4b8-....","tenantName":"tenant name"}}

The AdministrativeUnit entry is not showing within Bloodhound, and wanted to see if there's a way to actually have this enumerated.

image
image

@felixguerrero12
Copy link
Author

felixguerrero12 commented Jul 17, 2024

// We expand directoryScope in order to obtain the appId from app specific scoped role assignments
for item := range client.ListAzureADRoleAssignments(ctx, filter, "", "", "directoryScope", nil) {
if item.Error != nil {
log.Error(item.Error, "unable to continue processing role assignments for this role", "roleDefinitionId", id)
} else {
log.V(2).Info("found role assignment", "roleAssignments", item)
count++
// To ensure proper linking to AZApp nodes we want to supply the AppId instead when role assignments are app specific scoped
if item.Ok.DirectoryScopeId != "/" {
item.Ok.DirectoryScopeId = fmt.Sprintf("/%s", item.Ok.DirectoryScope.AppId)
}
roleAssignments.RoleAssignments = append(roleAssignments.RoleAssignments, item.Ok)
}

I was looking at the source code and not sure if its collected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant