@Andy - Thanks for the question and using MS Q&A platform.
To create multiple roles using TMSL script, you can use the following sample script as a reference and modify it according to your requirements:
{
"createOrReplace": {
"object": {
"database": "SalesBI",
"role": "Analyst"
},
"role": {
"name": "Users",
"description": "All allowed users to query the model",
"modelPermission": "read",
"members": [
{
"memberName": "user1@contoso.com",
"identityProvider": "AzureAD"
},
{
"memberName": "user2@contoso.com",
"identityProvider": "AzureAD"
}
]
}
}
},
{
"createOrReplace": {
"object": {
"database": "SalesBI",
"role": "Manager"
},
"role": {
"name": "Managers",
"description": "All allowed managers to query the model",
"modelPermission": "read",
"members": [
{
"memberName": "user3@contoso.com",
"identityProvider": "AzureAD"
},
{
"memberName": "user4@contoso.com",
"identityProvider": "AzureAD"
}
]
}
}
}
Note: In this sample script, two roles are created: Analyst and Manager. You can modify the script to add more roles as per your requirements.
Hope this helps. Let me know if you have any further questions!