First published on TECHNET on Apr 09, 2019
Hello All,
Here are some quick rule to explain it very clearly on how the limits work:
You can read more about the solutions here
Next question was changing ownership using PowerShell you can write a script based on this example:
NOTE: 1) These PowerShell modules are in Preview and can change often and dramatically, 2) You cannot remove original owner
# TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS for A PARTICULAR PURPOSE. We grant You a nonexclusive, royalty-free right to use and modify
# the Sample Code and to reproduce and distribute the object code form of the Sample Code, provided that You agree: (i) to not use Our name, logo, or
# trademarks to market Your software product in which the Sample Code is embedded; (ii) to include a valid copyright notice on Your software product in
# which the Sample Code is embedded; and (iii) to indemnify, hold harmless, and defend Us and Our suppliers from and against any claims or lawsuits,
# including attorneys fees, that arise or result from the use or distribution of the Sample Code.
#
# Adds owners to flow and attempts to remove an owner Note: You cannot remove original owner
# https://docs.microsoft.com/en-us/power-platform/admin/powerapps-powershell
#
# -Run this script from elevated prompt
#
# Don't forget to: Set-ExecutionPolicy RemoteSigned
#
# Written by Chris Weaver (christwe@microsoft.com)
# Create date: 3/15/2019
#
#****************************************************************************************
$AdminLoginName = "admin@weaverbiz.onmicrosoft.com"
$OldPowerAppUserName = $AdminLoginName
$NewPowerAppUserName = "christwe@weaverbiz.onmicrosoft.com"
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
$AdminCred = Get-Credential -UserName $AdminLoginName -Message "Enter admin creds"
Add-PowerAppsAccount -Username $AdminCred.UserName -Password $AdminCred.Password
Connect-MsolService -Credential $AdminCred
$PowerAppUserID = (Get-MsolUser -UserPrincipalName $OldPowerAppUserName).ObjectId
$NewPowerAppUserID = (Get-MsolUser -UserPrincipalName $NewPowerAppUserName).ObjectId
Get-Adminflow | ForEach-Object {
$FlowOwnerRoleObj = Get-AdminFlowOwnerRole -FlowName $_.FlowName -EnvironmentName $_.EnvironmentName
$FlowOwnerID = $FlowOwnerRoleObj.PrincipalObjectId
$FlowOwnerRoleID = $FlowOwnerRoleObj.RoleID
if ($FlowOwnerID -eq $PowerAppUserID)
{
Remove-AdminFlowOwnerRole -FlowName $_.FlowName -EnvironmentName $_.EnvironmentName -RoleId $FlowOwnerRoleID
Set-AdminFlowOwnerRole -FlowName $_.FlowName -EnvironmentName $_.EnvironmentName -RoleName CanEdit -PrincipalType User -PrincipalObjectId $NewPowerAppUserID
}
}
Pax
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.