Skip to content

Commit

Permalink
Merge branch 'dev' into FileAndFolderImprovements
Browse files Browse the repository at this point in the history
  • Loading branch information
KoenZomers authored Sep 2, 2023
2 parents a958eff + ea8ba15 commit 1fd20ed
Show file tree
Hide file tree
Showing 35 changed files with 5,921 additions and 4,794 deletions.
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,19 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
### Added

- Added `-MediaTranscription` and `-MediaTranscriptionAutomaticFeatures` to `Set-PnPTenant` which allows for configuring the media transcription settings. [#3238](https://github.com/pnp/powershell/pull/3238)
- 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 `-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)
- Added `Get-PnPFolder` cmdlet without any parameters to return all folders in the root of the current web [#3319](https://github.com/pnp/powershell/pull/3319)
- Added `Get-PnPFolderFile` cmdlet which allows retrieval of all files in a folder or site and optionally request additional properties from them [#3319](https://github.com/pnp/powershell/pull/3319)
- Added `Get-PnPFolderFolder` cmdlet which allows retrieval of all folders in a folder or site and optionally request additional properties from them [#3319](https://github.com/pnp/powershell/pull/3319)
- Added `-SharingStatus` parameter to `Get-PnPFlow` which allows for filtering flows based on their sharing status. [#3287](https://github.com/pnp/powershell/pull/3287)
- Added `-AzureADLoginEndPoint` and `-MicrosoftGraphEndPoint` parameters to `Connect-PnPOnline` cmdlet for use in custom Azure environments. [#2925](https://github.com/pnp/powershell/pull/2925)
- Added `SiteOwnerManageLegacyServicePrincipalEnabled` parameter to `Set-PnPTenant` cmdlet. With this parameter site owners will not be able to register/update apps unless the tenant admin explicitly allows it. [#3318](https://github.com/pnp/powershell/pull/3318)
- Added `-EnableAutoExpirationVersionTrim`, `-ExpireVersionsAfterDays`, `-MajorVersions`, `-MinorVersions`, `-InheritTenantVersionPolicySettings`, `-StartApplyVersionPolicySettingToExistingDocLibs` and `-CancelApplyVersionPolicySettingToExistingDocLibs` to `Set-PnPSite` to allow for time based version expiration on the site level [#3373](https://github.com/pnp/powershell/pull/3373)
- Added `-ReduceTempTokenLifetimeEnabled`, `-ReduceTempTokenLifetimeValue`, `-ViewersCanCommentOnMediaDisabled`, `-AllowGuestUserShareToUsersNotInSiteCollection`, `-ConditionalAccessPolicyErrorHelpLink`, `-CustomizedExternalSharingServiceUrl`, `-IncludeAtAGlanceInShareEmails` and `-MassDeleteNotificationDisabled` to `Set-PnPTenant` [#3348](https://github.com/pnp/powershell/pull/3348)
- Added `Add-PnPFlowOwner` and `Remove-PnPFlowOwner` cmdlets which allow granting or removing permissions to a Power Automate flow [#3343](https://github.com/pnp/powershell/pull/3343)

### Fixed

Expand All @@ -33,9 +40,32 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed `Get-PnPFolderItem` cmdlet not accepting piping a folder instance to it [#3319](https://github.com/pnp/powershell/pull/3319)
- Fixed `Get-PnPFolderItem` cmdlet not working well with the `-Recursive` and `-Identity` parameters provided together [#3319](https://github.com/pnp/powershell/pull/3319)
- Fixed `Get-PnPFolderItem` cmdlet not working well with the `-ItemName` parameter [#3319](https://github.com/pnp/powershell/pull/3319)
- Fixed `Connect-PnPOnline` cmdlet throwing host not reachable errors. [#3337](https://github.com/pnp/powershell/pull/3337)
- Fixed `Set-PnPTerm` cmdlet throwing object reference error when only the term Id is specified. [#3341](https://github.com/pnp/powershell/pull/3341)
- Fixed `New-PnPTeamsTeam` cmdlet throwing an error when specifying members [#3351](https://github.com/pnp/powershell/pull/3351)
- Fixed `New-PnPTeamsTeam` cmdlet not working well with a managed identity [#3351](https://github.com/pnp/powershell/pull/3351)

### Changed

- Improved `Set-PnPListItem` cmdlet handling of Purview labels. [#3340](https://github.com/pnp/powershell/pull/3340)
- The `Publish-PnPCompanyApp` cmdlet is now obsolete. It will be removed in the next version. [#3349](https://github.com/pnp/powershell/pull/3349)
- Verbose output will no longer show the access token [#3352](https://github.com/pnp/powershell/pull/3352)

### Removed

- Removed `-DisableListSync` and `-SyncAadB2BManagementPolicy` from `Set-PnPTenant` as the underlying properties have been removed from SharePoint CSOM as well [#3388](https://github.com/pnp/powershell/pull/3388)

### Contributors

- Jonathan Smith [jonathan-m-smith]
- Carl Joakim Damsleth [damsleth]
- Rodel Pacurib [ryder-cayden]
- [CatSchneider]
- [msjennywu]
- Reshmee Auckloo [reshmee011]
- Per Østergaard [per-oestergaard]
- Nishkalank Bezawada [NishkalankBezawada]
- [PowerBugi]
- Ganesh Sanap [ganesh-sanap]
- Siddharth Vaghasia [siddharth-vaghasia]
- Giacomo Pozzoni [jackpoz]
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>`
133 changes: 133 additions & 0 deletions documentation/Add-PnPFlowOwner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
Module Name: PnP.PowerShell
schema: 2.0.0
applicable: SharePoint Online
online version: https://pnp.github.io/powershell/cmdlets/Add-PnPFlowOwner.html
external help file: PnP.PowerShell.dll-Help.xml
title: Add-PnPFlowOwner
---

# Add-PnPFlowOwner

## SYNOPSIS

**Required Permissions**

* Azure: management.azure.com

Assigns/updates permissions to a Power Automate flow

## SYNTAX

```powershell
Add-PnPFlowOwner -Environment <PowerAutomateEnvironmentPipeBind> -Identity <PowerPlatformPipeBind> -User <String> -Role <FlowAccessRole> [-AsAdmin] [-Verbose]
```

## DESCRIPTION
This cmdlet assigns/updates permissions for a user to a Power Automate flow.

## EXAMPLES

### Example 1
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User [email protected] -Role CanEdit
```
Assigns the specified user with 'CanEdit' access level to the specified flow

### Example 2
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User 6844c04a-8ee7-40ad-af66-28f6e948cd04 -Role CanView
```
Assigns the specified user with 'CanView' access level to the specified flow

### Example 3
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User 6844c04a-8ee7-40ad-af66-28f6e948cd04 -Role CanViewWithShare
```
Assigns the specified user with 'CanViewWithShare' access level to the specified flow

### Example 4
```powershell
Add-PnPFlowOwner -Environment (Get-PnPPowerPlatformEnvironment -IsDefault) -Identity f07c34a9-a586-4e58-91fb-e7ea19741b61 -User [email protected] -AsAdmin -Role CanEdit
```
Assigns the specified user with 'CanEdit' access level to the specified flow as admin

## PARAMETERS

### -Environment
The Power Platform environment that hosts the Power Automate Flow to add the permissions to.

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

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Identity
The Name, Id or instance of the Power Automate Flow to add the permissions to.
```yaml
Type: PowerPlatformPipeBind
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -User
The user principal name or Id of the user to assign permissions to the Power Automate Flow.
```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```
### -Role
The type of permissions to assign to the user on the Power Automate Flow. Valid values: CanView, CanViewWithShare, CanEdit.
```yaml
Type: FlowUseFlowAccessRolerRoleName
Parameter Sets: (All)

Required: True
Position: Named
Default value: CanView
Accept pipeline input: False
Accept wildcard characters: False
```
### -AsAdmin
If specified, the permission will be set as an admin. If not specified only the flows to which the current user already has access can be modified.
```yaml
Type: SwitchParameter
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)
4 changes: 2 additions & 2 deletions documentation/Find-PnPFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Accept wildcard characters: False
```
### -Match
Wildcard query
Wildcard query using * (any number of charactes) and ? (single character)
```yaml
Type: String
Expand All @@ -113,7 +113,7 @@ Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
Accept wildcard characters: True
```
Expand Down
3 changes: 1 addition & 2 deletions documentation/Get-PnPApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ Returns the available apps from the app catalog
## SYNTAX

```powershell
Get-PnPApp [[-Identity] <AppMetadataPipeBind>] [-Scope <AppCatalogScope>] [-Connection <PnPConnection>]
Get-PnPApp [-Identity <AppMetadataPipeBind>] [-Scope <AppCatalogScope>] [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand Down
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
16 changes: 9 additions & 7 deletions documentation/Get-PnPFile.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@ Downloads a file

### Return as file object (Default)
```powershell
Get-PnPFile [-Url] <String> -AsFileObject [-Connection <PnPConnection>]
Get-PnPFile -Url <String> -AsFileObject [-Connection <PnPConnection>]
```

### Return as list item
```powershell
Get-PnPFile [-Url] <String> -AsListItem [-ThrowExceptionIfFileNotFound]
[-Connection <PnPConnection>]
Get-PnPFile -Url <String> -AsListItem [-ThrowExceptionIfFileNotFound] [-Connection <PnPConnection>]
```

### Save to local path
```powershell
Get-PnPFile [-Url] <String> -AsFile [-Path <String>] [-Filename <String>] [-Force]
[-Connection <PnPConnection>]
Get-PnPFile -Url <String> -AsFile -Path <String> -Filename <String> [-Force] [-Connection <PnPConnection>]
```

### Return as string
```powershell
Get-PnPFile [-Url] <String> -AsString [-Connection <PnPConnection>]
Get-PnPFile -Url <String> -AsString [-Connection <PnPConnection>]
```

### Return as memorystream
```powershell
Get-PnPFile -Url <String> -AsMemoryStream [-Connection <PnPConnection>]
```

## DESCRIPTION
Expand Down
47 changes: 39 additions & 8 deletions documentation/Get-PnPFlow.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,48 @@ title: Get-PnPFlow

* Azure: management.azure.com

Returns the flows for a given environment
Returns Power Automate Flows

## SYNTAX

### All (Default)
```powershell
Get-PnPFlow [-Environment <PowerAutomateEnvironmentPipeBind>] [-AsAdmin] [-Identity <PowerPlatformPipeBind>]
[-Connection <PnPConnection>] [-Verbose]
Get-PnPFlow [-Environment <PowerAutomateEnvironmentPipeBind>] [-AsAdmin] [-SharingStatus <FlowSharingStatus>] [-Connection <PnPConnection>] [-Verbose]
```

### By Identity
```powershell
Get-PnPFlow [-Environment <PowerAutomateEnvironmentPipeBind>] [-AsAdmin] [-Identity <PowerPlatformPipeBind>] [-Connection <PnPConnection>] [-Verbose]
```

## DESCRIPTION
This cmdlet returns the flows for a given environment.
This cmdlet returns Power Automate Flows meeting the specified criteria.

## EXAMPLES

### Example 1
```powershell
Get-PnPPowerPlatformEnvironment -Identity "MyOrganization (default)" | Get-PnPFlow
Get-PnPFlow -AsAdmin
```
This returns all the flows for a given Power Platform environment
Returns all the flows in the default Power Platform environment belonging to any user

### Example 2
```powershell
Get-PnPPowerPlatformEnvironment -Identity "MyOrganization (default)" | Get-PnPFlow
```
Returns all the flows for a given Power Platform environment belonging to the current user

### Example 3
```powershell
Get-PnPFlow -SharingStatus SharedWithMe
```
Returns all the flows which have been shared with the current user in the default Power Platform environment

### Example 4
```powershell
Get-PnPFlow -Identity fba63225-baf9-4d76-86a1-1b42c917a182
```
This returns a specific flow from the default environment
Returns a specific flow from the default Power Platform environment

## PARAMETERS

Expand All @@ -63,7 +80,7 @@ The Name/Id of the flow to retrieve.
```yaml
Type: PowerPlatformPipeBind
Parameter Sets: (All)
Parameter Sets: By Identity
Aliases:

Required: False
Expand Down Expand Up @@ -104,6 +121,20 @@ Accept pipeline input: False
Accept wildcard characters: False
```
### -SharingStatus
Allows specifying the type of Power Automate Flows that should be returned. Valid values: All, SharedWithMe, Personal.
```yaml
Type: FlowSharingStatus
Parameter Sets: All

Required: False
Position: Named
Default value: All
Accept pipeline input: False
Accept wildcard characters: False
```
### -Verbose
When provided, additional debug statements will be shown while executing the cmdlet.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ Accept wildcard characters: False
## RELATED LINKS
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp)
Loading

0 comments on commit 1fd20ed

Please sign in to comment.