Table of Contents

Get-PnPPowerPlatformEnvironment

SYNOPSIS

Required Permissions

  • Azure: management.azure.com

Retrieves the Microsoft Power Platform environments for the current tenant.

SYNTAX

Default (Default)

Get-PnPPowerPlatformEnvironment [-IsDefault] [-Connection <PnPConnection>] [-Verbose]

By Identity

Get-PnPPowerPlatformEnvironment -Identity <PowerPlatformEnvironmentPipeBind> [-Connection <PnPConnection>] [-Verbose]

DESCRIPTION

This cmdlet retrieves all of the Microsoft Power Platform environments for the current tenant.

Prerequisites

Your Entra app registration must have the user_impersonation delegated permission from the Azure Service Management API. To add this permission using Azure CLI:

az ad app permission add --id <your-app-id> --api 797f4846-ba00-4fd7-ba43-dac1f8f63013 --api-permissions 41094075-9dad-400e-a0bd-54e686782033=Scope
az ad app permission admin-consent --id <your-app-id>

EXAMPLES

Example 1

Get-PnPPowerPlatformEnvironment

This cmdlets returns all of the Power Platform environments for the current tenant.

Example 2

Get-PnPPowerPlatformEnvironment -IsDefault:$true

This cmdlets returns the default Power Platform environment for the current tenant.

Example 3

Get-PnPPowerPlatformEnvironment -Identity "MyOrganization (default)"

This cmdlets returns the Power Platform environment with the provided display name for the current tenant.

PARAMETERS

-Identity

Allows specifying an environment display name or internal name to retrieve a specific environment.

Type: bool
Parameter Sets: By Identity
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-IsDefault

Allows retrieval of the default Power Platform environment by passing in -IsDefault:$true. When passing in -IsDefault:$false you will get all non default environments. If not provided at all, all available environments, both default and non-default, will be returned.

Type: SwitchParameter
Parameter Sets: Default
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type: PnPConnection
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Verbose

When provided, additional debug statements will be shown while executing the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Microsoft 365 Patterns and Practices