< Back

Set-AdminPowerAppEnvironmentRoleAssignment

Sat Jan 18, 2020 3:51 pm

NAME Set-AdminPowerAppEnvironmentRoleAssignment



SYNOPSIS

Sets permissions to an environment without a Common Data Service For Apps database instance. If you make this call

to an environment with a Common Data Service for Apps database instance you will get a 403 Forbidden error.





SYNTAX

Set-AdminPowerAppEnvironmentRoleAssignment -EnvironmentName <String> -RoleName <String> -PrincipalType <String>

-PrincipalObjectId <String> [-ApiVersion <String>] [<CommonParameters>]



Set-AdminPowerAppEnvironmentRoleAssignment -EnvironmentName <String> -RoleName <String> -PrincipalType <String>

[-PrincipalObjectId <String>] [-ApiVersion <String>] [<CommonParameters>]





DESCRIPTION

The Set-AdminPowerAppEnvironmentRoleAssignment set up permission to environment depending on parameters.

Use Get-Help Set-AdminPowerAppEnvironmentRoleAssignment -Examples for more detail.





PARAMETERS

-EnvironmentName <String>

The environmnet id.



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-RoleName <String>

Specifies the permission level given to the environment: Environment Admin or Environment Maker.



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-PrincipalType <String>

Specifies the type of principal this environment is being shared with; a user, a security group, the entire

tenant.



Required? true

Position? named

Default value

Accept pipeline input? true (ByPropertyName)

Accept wildcard characters? false



-PrincipalObjectId <String>

If this environment is being shared with a user or security group principal, this field specified the ObjectId

for that principal. You can use the Get-UsersOrGroupsFromGraph API to look-up the ObjectId for a user or group

in Azure Active Directory.



Required? true

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-ApiVersion <String>



Required? false

Position? named

Default value 2016-11-01

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Set-AdminPowerAppEnvironmentRoleAssignment -EnvironmentName 3c2f7648-ad60-4871-91cb-b77d7ef3c239 -RoleName

EnvironmentAdmin -PrincipalType User -PrincipalObjectId 53c0a918-ce7c-401e-98f9-1c60b3a723b3



Assigns the Environment Admin role privileges to the the user with an object id of

53c0a918-ce7c-401e-98f9-1c60b3a723b3 in the environment 3c2f7648-ad60-4871-91cb-b77d7ef3c239









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Set-AdminPowerAppEnvironmentRoleAssignment -EnvironmentName 3c2f7648-ad60-4871-91cb-b77d7ef3c239 -RoleName

EnvironmentMaker -PrincipalType Tenant



Assigns everyone Environment Maker role privileges in the environment 3c2f7648-ad60-4871-91cb-b77d7ef3c239











RELATED LINKS