Permissions with roles and Scripts

I am on version 5.0.15.

I have written my issue out in more detail in the following post:
https://forums.ironmansoftware.com/t/how-do-you-give-granular-permissions-to-scripts-in-v5/11663/2

Now, when I test with an account that has been created from an external source (in my case Azure), it seems that I can add him/her to an extra role.
Local accounts however, throw me the following error:

Another issue is that with users that have been provisioned form an external source by the use of claims, is that you don’t visually see which roles they have.