A collection of neat commands
Well, as of starting this post, it will be a single command. But this will be more of a personal collection of neat commands, with a varying degree of useability.
Hiding consent pop-up
First up, hiding the consent pop-up of connectors when opening up a Canvas App.
It is run through PowerShell, and requires the following two commands to have been run previously
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
Install-Module -Name Microsoft.PowerApps.PowerShell -AllowClobber
After this, we run a seperate command, which requires both the environmentID and the ApplicationID
Generally, the environmentID can be sniffed from the URL of the front page, i.e. https://make.powerapps.com/environments/7ce3f268-9151-e1eb-bc16-01758cc06a53/apps with the EnvironmentID being 7ce3f268-9151-e1eb-bc16-01758cc06a53.
The application ID, can be found by navigating to the application and selecting “Details”, then it too will show up in the URL, i.e. https://make.powerapps.com/environments/7ce3f268-9151-e1eb-bc16-01758cc06a53/apps/4058a68a-ba69-404b-80cb-d56fc7b89207/details. Here the environmentID remains the same; 7ce3f268-9151-e1eb-bc16-01758cc06a53 and the applicationID is 4058a68a-ba69-404b-80cb-d56fc7b89207.
The PowerShell command that needs to be triggered to hide the consent pop-up for this specific application in this specific environment, is the following:
Set-AdminPowerAppApisToBypassConsent -EnvironmentName 7ce3f268-9151-e1eb-bc16-01758cc06a53 -AppName 4058a68a-ba69-404b-80cb-d56fc7b89207
Allowing Guest users to edit
This action also reqruires the PowerShell module for PowerApps.Administration
Install-Module -Name Microsoft.PowerApps.Administration.PowerShell
When the module is installed, we need to connect to the tenant in question, which is done with the following:
If you’re ever in doubt of your TenantID, or maybe the tenant isn’t yours, you can find it here: https://www.whatismytenantid.com/
Connect-AzAccount -Tenant <tenantID>
Once the connection is made, all that is left to do, is run the following PowerShell script:
$requestBody = Get-TenantSettings
$requestBody.powerPlatform.powerApps.enableGuestsToMake = $True
Set-TenantSettings $requestBody
and once that is run, the guest users in the defined tenant, will be able to edit Power Apps & Power Automate flows, assuming they have been given the rights to do so, for the specific items.