Quantcast
Channel: VMware Communities : Discussion List - vSphere SDK for Perl
Viewing all articles
Browse latest Browse all 1577

SetentityPermissions error: a specified parameter was not correct: entity

$
0
0

With this code:

my $host_view = Vim::find_entity_view( view_type => 'HostSystem' );
$permission = Permission->new(       principal => "$localuser",      group    => 'false',      roleId    =>  FindRoleID( $authMgr, $rolename ),      propagate => 'true',
);
@permissions = ($permission);
$authMgr->SetEntityPermissions(            entity    => $host_view,            permission => @permissions,
);

 

I want to assign a local user a custom role (both exist). The role should be assigned on the root level of the host, so that's why I use the view_type HostSystem. What am I doing wrong? Thanks in advance


Viewing all articles
Browse latest Browse all 1577

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>