Well maybe you are in the same situation that i was, if you are using azure static web apps with Managed functions then you are not able to set the managed roles here is the doc.
You need to switch to azure functions Bring your own functions.
https://learn.microsoft.com/en-us/azure/static-web-apps/apis-functions