Dynamicly create permissons to folder based on AD name

I can create new folder via HTTP api, i can create new dashboard with HTTP api and put it into the folder.

However, can i control access? Lets say i want to create new folder with HTTP api, and add EDITOR permissions of this folder to the person who belongs to certain AD GROUP which i specify lets say in http api call , is this possible? Or is specifying AD groups/permissions combo only possible in configuration file?

Thanks for help!

I don’t know if the folder permissions http api can do that:

might be an enterprise RBAC thing: