Skip to content

Commit

Permalink
Merge branch 'dev' into features/getlistitem-includes
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers authored Aug 6, 2023
2 parents b1f5e04 + dc890d0 commit 2501467
Show file tree
Hide file tree
Showing 29 changed files with 2,572 additions and 1,677 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,29 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Added `-MediaTranscription` and `-MediaTranscriptionAutomaticFeatures` to `Set-PnPTenant` which allows for configuring the media transcription settings. [#3238](https://github.com/pnp/powershell/pull/3238)
- Added `-Includes` option to `Get-PnPListItem` which allows for specifying additional fields to be retrieved. [#3270](https://github.com/pnp/powershell/pull/3270)
- Added `-AllowCommentsTextOnEmailEnabled` parameter to `Set-PnPTenant` which allows including the surrounding document context in email notification when user is mentioned in document comments. [#3268](https://github.com/pnp/powershell/pull/3268)
- Added `Export-PnPPowerApp` cmdlet which will export a specified PowerApp as zip package. [#2990](https://github.com/pnp/powershell/pull/2990)
- Added `-AzureADLoginEndPoint` and `-MicrosoftGraphEndPoint` parameters to `Connect-PnPOnline` cmdlet for use in custom Azure environments. [#2925](https://github.com/pnp/powershell/pull/2925)

### Fixed

- Fixed `Add-PnPContentTypeToList` cmdlet to better handle piped lists. [#3244](https://github.com/pnp/powershell/pull/3244)
- Fixed `Get-PnPUserProfileProperty` cmdlet not allowing basic user profile properties to be retrieved using `-Properties` [#3247](https://github.com/pnp/powershell/pull/3247)
- Fixed `Export-PnPTermGroupToXml` cmdlet issue with exporting site collection term groups. [#3256](https://github.com/pnp/powershell/pull/3256)
- Fixed `Register-PnPAzureADApp` cmdlet issue with creation of Azure AD application. [#3265](https://github.com/pnp/powershell/pull/3265)
- Fixed `Get-PnPServiceHealthIssue` cmdlet issue with null reference objection. [#3286](https://github.com/pnp/powershell/pull/3286)
- Fixed `New-PnPSite` cmdlet issue with team site creation when using a connection object. [#3285](https://github.com/pnp/powershell/pull/3285)
- Fixed issue with colliding assemblies when using PnP PowerShell with other modules. [#3280](https://github.com/pnp/powershell/pull/3280)
- Fixed issue with `-ArchiveRedirectUrl` parameter not working correctly in `Set-PnPTenant` cmdlet. [#3289](https://github.com/pnp/powershell/pull/3289)
- Fixed `New-PnPAzureADGroup` cmdlet throwing null reference error when owners and members are not specified. [#3308](https://github.com/pnp/powershell/pull/3308)
- Fixed `New-PnPTeamsTeam` cmdlet, it will now throw error if it fails to teamify a Microsoft 365 group. [#3310](https://github.com/pnp/powershell/pull/3310)

### Contributors

- [PowerBugi]
- Ganesh Sanap [ganesh-sanap]
- Siddharth Vaghasia [siddharth-vaghasia]
- Giacomo Pozzoni [jackpoz]
- Martin Lingstuyl [martinlingstuyl]
- Arleta Wanat [PowershellScripts]
- Nils Andresen [nils-a]
Expand Down
4 changes: 2 additions & 2 deletions MIGRATE-1.0-to-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Using PnP PowerShell in Azure functions ? You might be required to change the Pn
| ----------- | ---------------------- | -------------------- | --------------------- |
| New-PnPTenantSite | Force | - | The parameter was obsolete and not used. It has been removed. |
| Set-PnPTenantSite | BlockDownloadOfNonViewableFiles | AllowDownloadingNonWebViewableFiles | The parameter was obsolete and hence removed. Use `AllowDownloadingNonWebViewableFiles` |
| Connect-PnPOnline | NoTelemetry | - | The parameter was obsolete and hence removed. Use `$env:PNP_DISABLETELEMETRY` environment variable or `Disable-PnPTelemetry/Enable-PnPTelemetry` cmdlet |
| Connect-PnPOnline | NoTelemetry | - | The parameter was obsolete and hence removed. Use `$env:PNPPOWERSHELL_DISABLETELEMETRY` environment variable or `Disable-PnPTelemetry/Enable-PnPTelemetry` cmdlet |
| Connect-PnPOnline | NoVersionCheck | - | The parameter was obsolete and hence removed. Use `$env:PNPPOWERSHELL_UPDATECHECK` environment variable |
| Disconnect-PnPOnline | Connection | - | The parameter was obsolete and hence removed. |
| Request-PnPAccessToken | Resource | Scopes | The parameter was obsolete and hence removed. Use `Scopes` instead |
Expand Down Expand Up @@ -90,4 +90,4 @@ Using PnP PowerShell in Azure functions ? You might be required to change the Pn
- The output type of `Get-PnPAzureADGroupMember` has changed to `PnP.PowerShell.Commands.Model.Microsoft365User`
- The output type of `Get-PnPAzureADGroup` has changed to `PnP.PowerShell.Commands.Model.Graph.Group`
- The output type of `New-PnPAzureADGroup` has changed to `PnP.PowerShell.Commands.Model.Graph.Group`
- The output type of `Get-PnPUserProfileProperty` has changed to `SortedDictionary<string, object>`
- The output type of `Get-PnPUserProfileProperty` has changed to `SortedDictionary<string, object>`
62 changes: 52 additions & 10 deletions documentation/Connect-PnPOnline.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,41 @@ Connect to a SharePoint site
Connect-PnPOnline [-ReturnConnection] [-Url] <String> [-Credentials <CredentialPipeBind>] [-CurrentCredentials]
[-CreateDrive] [-DriveName <String>] [-ClientId <String>] [-RedirectUri <String>]
[-AzureEnvironment <AzureEnvironment>] [-TenantAdminUrl <String>]
[-TransformationOnPrem] [-ValidateConnection] [-Connection <PnPConnection>]
[-TransformationOnPrem] [-ValidateConnection] [-MicrosoftGraphEndPoint <string>]
[-AzureADLoginEndPoint <string>] [-Connection <PnPConnection>]
```

### SharePoint ACS (Legacy) App Only
```powershell
Connect-PnPOnline [-ReturnConnection] [-Url] <String> [-Realm <String>] -ClientSecret <String> [-CreateDrive]
[-DriveName <String>] -ClientId <String> [-AzureEnvironment <AzureEnvironment>] [-TenantAdminUrl <String>]
[-ValidateConnection] [-Connection <PnPConnection>]
[-ValidateConnection] [-MicrosoftGraphEndPoint <string>]
[-AzureADLoginEndPoint <string>] [-Connection <PnPConnection>]
```

### App-Only with Azure Active Directory
```powershell
Connect-PnPOnline [-ReturnConnection] [-Url] <String> [-CreateDrive] [-DriveName <String>] -ClientId <String>
-Tenant <String> [-CertificatePath <String>] [-CertificateBase64Encoded <String>]
[-CertificatePassword <SecureString>] [-AzureEnvironment <AzureEnvironment>] [-TenantAdminUrl <String>]
[-ValidateConnection] [-Connection <PnPConnection>]
[-ValidateConnection] [-MicrosoftGraphEndPoint <string>]
[-AzureADLoginEndPoint <string>] [-Connection <PnPConnection>]
```

### App-Only with Azure Active Directory using a certificate from the Windows Certificate Management Store by thumbprint
```powershell
Connect-PnPOnline [-ReturnConnection] [-Url] <String> [-CreateDrive] [-DriveName <String>] -ClientId <String>
-Tenant <String> -Thumbprint <String> [-AzureEnvironment <AzureEnvironment>] [-TenantAdminUrl <String>]
[-ValidateConnection] [-Connection <PnPConnection>]
[-ValidateConnection] [-MicrosoftGraphEndPoint <string>]
[-AzureADLoginEndPoint <string>] [-Connection <PnPConnection>]
```

### PnP Management Shell / DeviceLogin
```powershell
Connect-PnPOnline [-ReturnConnection] [-Url] <String> [-CreateDrive] [-DriveName <String>] [-DeviceLogin]
[-LaunchBrowser] [-ClientId <String>] [-AzureEnvironment <AzureEnvironment>]
[-ValidateConnection] [-Connection <PnPConnection>]
[-ValidateConnection] [-MicrosoftGraphEndPoint <string>]
[-AzureADLoginEndPoint <string>] [-Connection <PnPConnection>]
```

### Web Login for Multi Factor Authentication
Expand All @@ -61,7 +66,7 @@ Connect-PnPOnline [-ReturnConnection] [-Url] <String> [-CreateDrive] [-DriveName
### Interactive for Multi Factor Authentication
```powershell
Connect-PnPOnline -Interactive [-ReturnConnection] -Url <String> [-CreateDrive] [-DriveName <String>] [-LaunchBrowser]
[-ClientId <String>] [-AzureEnvironment <AzureEnvironment>] [-TenantAdminUrl <String>] [-ForceAuthentication] [-ValidateConnection] [-Connection <PnPConnection>]
[-ClientId <String>] [-AzureEnvironment <AzureEnvironment>] [-TenantAdminUrl <String>] [-ForceAuthentication] [-ValidateConnection] [-MicrosoftGraphEndPoint <string>] [-AzureADLoginEndPoint <string>] [-Connection <PnPConnection>]
```

### On-premises login for page transformation from on-premises SharePoint to SharePoint Online
Expand All @@ -70,8 +75,8 @@ Connect-PnPOnline -Url <String> -TransformationOnPrem [-CurrentCredential]
```

### Access Token
```powershell
Connect-PnPOnline -Url <String> -AccessToken <String> [-AzureEnvironment <AzureEnvironment>] [-ReturnConnection]
```
Connect-PnPOnline -Url <String> -AccessToken <String> [-AzureEnvironment <AzureEnvironment>] [-MicrosoftGraphEndPoint <string>] [-AzureADLoginEndPoint <string>] [-ReturnConnection]
```

### System Assigned Managed Identity
Expand Down Expand Up @@ -99,7 +104,7 @@ Connect-PnPOnline [-Url <String>] -ManagedIdentity -UserAssignedManagedIdentityA
Connect-PnPOnline [-ReturnConnection] [-Url] <String> [-EnvironmentVariable] [-CurrentCredentials]
[-CreateDrive] [-DriveName <String>] [-RedirectUri <String>]
[-AzureEnvironment <AzureEnvironment>] [-TenantAdminUrl <String>]
[-TransformationOnPrem] [-ValidateConnection] [-Connection <PnPConnection>]
[-TransformationOnPrem] [-ValidateConnection] [-MicrosoftGraphEndPoint <string>] [-AzureADLoginEndPoint <string>] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand Down Expand Up @@ -250,6 +255,13 @@ So, when using `-EnvironmentVariable` method for authenticating, we will require
If `AZURE_USERNAME`, `AZURE_PASSWORD` and `AZURE_CLIENT_ID`, we will use these environment variables and authenticate using credentials flow.

We support only Service principal with certificate and Username with password mode for authentication. Configuration will be attempted in that order. For example, if values for a certificate and username+password are both present, the client certificate method will be used.

### EXAMPLE 17
```
Connect-PnPOnline -Url contoso.sharepoint.com -AzureEnvironment Custom -MicrosoftGraphEndPoint "custom.graph.microsoft.com" -AzureADLoginEndPoint "https://custom.login.microsoftonline.com"
```

Use this method to connect to a custom Azure Environment. You can also specify the `MicrosoftGraphEndPoint` and `AzureADLoginEndPoint` parameters if applicable. If specified, then these values will be used to make requests to Graph and to retrieve access token.
## PARAMETERS

### -AccessToken
Expand Down Expand Up @@ -277,7 +289,7 @@ The Azure environment to use for authentication, the defaults to 'Production' wh
Type: AzureEnvironment
Parameter Sets: Credentials, SharePoint ACS (Legacy) App Only, App-Only with Azure Active Directory, App-Only with Azure Active Directory using a certificate from the Windows Certificate Management Store by thumbprint, PnP Management Shell / DeviceLogin, Interactive, Access Token, Environment Variable
Aliases:
Accepted values: Production, PPE, China, Germany, USGovernment, USGovernmentHigh, USGovernmentDoD
Accepted values: Production, PPE, China, Germany, USGovernment, USGovernmentHigh, USGovernmentDoD, Custom

Required: False
Position: Named
Expand Down Expand Up @@ -769,6 +781,36 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -MicrosoftGraphEndPoint
Custom Microsoft Graph endpoint to be used if we are using Azure Custom environment. This will only work if `AzureEnvironment` parameter value is set to `Custom`.

```yaml
Type: String
Parameter Sets: Credentials, SharePoint ACS (Legacy) App Only, App-Only with Azure Active Directory, App-Only with Azure Active Directory using a certificate from the Windows Certificate Management Store by thumbprint, PnP Management Shell / DeviceLogin, Interactive, Access Token, Environment Variable
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -AzureADLoginEndPoint
Custom Azure AD login endpoint to be used if we are using Azure Custom environment to retrieve access token. This will only work if `AzureEnvironment` parameter value is set to `Custom`.

```yaml
Type: String
Parameter Sets: Credentials, SharePoint ACS (Legacy) App Only, App-Only with Azure Active Directory, App-Only with Azure Active Directory using a certificate from the Windows Certificate Management Store by thumbprint, PnP Management Shell / DeviceLogin, Interactive, Access Token, Environment Variable
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## RELATED LINKS

[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
198 changes: 198 additions & 0 deletions documentation/Export-PnPPowerApp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,198 @@
---
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Export-PnPPowerApp.html
external help file: PnP.PowerShell.dll-Help.xml
title: Export-PnPPowerApp
---

# Export-PnPPowerApp

## SYNOPSIS

**Required Permissions**

* Azure: management.azure.com

Exports a Microsoft Power App

## SYNTAX

```
Export-PnPPowerApp -Environment <PowerPlatformEnvironmentPipeBind> -Identity <PowerAppPipeBind>
[-PackageDisplayName <String>] [-PackageDescription <String>] [-PackageCreatedBy <String>]
[-PackageSourceEnvironment <String>] [-OutPath <String>] [-Force] [-Connection <PnPConnection>]
[<CommonParameters>]
```

## DESCRIPTION
This cmdlet exports a Microsoft Power App as zip package.

Many times exporting a Microsoft Power App will not be possible due to various reasons such as connections having gone stale, SharePoint sites referenced no longer existing or other configuration errors in the App. To display these errors when trying to export a App, provide the -Verbose flag with your export request. If not provided, these errors will silently be ignored.

## EXAMPLES

### Example 1
```powershell
$environment = Get-PnPPowerPlatformEnvironment -IsDefault $true
Export-PnPPowerApp -Environment $environment -Identity fba63225-baf9-4d76-86a1-1b42c917a182 -OutPath "C:\Users\user1\Downloads\test_20230408152624.zip"
```

This will export the specified Microsoft Power App from the default Power Platform environment as an output to the path specified in the command as -OutPath

### Example 2
```powershell
$environment = Get-PnPPowerPlatformEnvironment -IsDefault $true
Export-PnPPowerApp -Environment $environment -Identity fba63225-baf9-4d76-86a1-1b42c917a182 -OutPath "C:\Users\user1\Downloads\test_20230408152624.zip" -PackageDisplayName "MyAppDisplayName" -PackageDescription "Package exported using PnP Powershell" -PackageCreatedBy "Siddharth Vaghasia" -PackageSourceEnvironment "UAT Environment"
```
This will export the specified Microsoft Power App from the default Power Platform environment with metadata specified

### Example 3
```powershell
Get-PnPPowerPlatformEnvironment | foreach { Get-PnPPowerApp -Environment $_.Name } | foreach { Export-PnPPowerApp -Environment $_.Properties.EnvironmentDetails.Name -Identity $_ -OutPath "C:\Users\user1\Downloads\$($_.Name).zip" }
```

This will export all the Microsoft Power Apps available within the tenant from all users from all the available Power Platform environments as a ZIP package for each of them to a local folder C:\Users\user1\Downloads

## PARAMETERS

### -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.

```yaml
Type: PnPConnection
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Environment
The environment which contains the App.
```yaml
Type: PowerPlatformEnvironmentPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Identity
The value of the Name property of a Microsoft Power App that you wish to export
```yaml
Type: PowerAppPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Force
If specified and the file exported already exists it will be overwritten without confirmation.
```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -OutPath
Optional file name of the file to export to. If not provided, it will store the ZIP package to the current location from where the cmdlet is being run.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PackageCreatedBy
The name of the person to be used as the creator of the exported package
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PackageDescription
The description to use in the exported package
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PackageDisplayName
The display name to use in the exported package
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -PackageSourceEnvironment
The name of the source environment from which the exported package was taken
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
2 changes: 2 additions & 0 deletions documentation/Get-PnPAzureACSPrincipal.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Get-PnPAzureACSPrincipal [-Scope <AzureACSPrincipalScope>] [-IncludeSubsites <Sw

## DESCRIPTION

This cmdlet provides insight into the app registrations that have been done over time using AppRegNew.aspx. You could look at it as a (detailed) equivallent of AppPrincipals.aspx. This information can help to get insights into the app registrations that have been done on a tenant and prepare for the Azure Access Control Services (ACS) deprecation that will follow in the future.

## EXAMPLES

### EXAMPLE 1
Expand Down
Loading

0 comments on commit 2501467

Please sign in to comment.