@Adam can you provide an example code and where you run it of creating a custom role and assign it to apps as read please and thank you.
Product: PowerShell Universal
Version: 5.0.8
@Adam can you provide an example code and where you run it of creating a custom role and assign it to apps as read please and thank you.
Product: PowerShell Universal
Version: 5.0.8
This can just be done within the GUI!
The same process can be applied to API tokens - you can assign them to custom roles, allowing an app token to be scoped completely to a set of resources - endpoints, apps, etc.
Let me know if you have any other questions! Hope this helps!
ZG
Thank you for your example but in this case you cannot modify what people with this role can do if let say you want them just to have read.
i was playing with some code cause i found that using GUI you cannot accomplish what you want and wanted to know if below code is the correct approach or not of what am looking for.
Define the role properties
$roleName = “MyRole”
$roleDescription = “A custom role for specific permissions”Define permissions
$permissions = @(
@{
ResourceType = “Apps”
Actions = @(“Read”)
}
) | ConvertTo-JsonCreate the custom role
New-PSURole -Name $roleName -Description $roleDescription -Permissions $permissions
Per the current documentation, there’s also this (unfortunately):
Roles can only be scoped to resources at the current moment. Use of built-in roles with their global scope is, to my knowledge, the only way to provide that level of access control. That being said, if you’re able to get that role to work with the permissions map, please reply here as that would be incredible information to have!
i was able to get it work with permissions map.