A cloud-based identity and access management service for securing user authentication and resource access
Admin consent can only be granted by privileged (admin) user in the resource tenant. Similarly, it can be added programmatically if you have a service principal with sufficient permissions. Here's the relevant documentation: https://learn.microsoft.com/en-us/graph/api/serviceprincipal-post-approleassignments?view=graph-rest-beta&tabs=http