Skip to content

Commit 82ea3dd

Browse files
authored
Merge pull request #2850 from gautamdsheth/dev
Feature: made planner content URL mandatory for pnpteams tab
2 parents 130efe2 + 0f1ed19 commit 82ea3dd

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
4646
- Added `-UserAssignedManagedIdentityAzureResourceId` and `-UserAssignedManagedIdentityClientId` as alternatives to `-UserAssignedManagedIdentityObjectId` for `Connect-PnPOnline -ManagedIdentity` to provide an user managed identity to authenticate with. [#2813](https://github.com/pnp/powershell/pull/2813)
4747
- Added clearer error message when connecting using an expired client secret and trying to execute a command.[#2828](https://github.com/pnp/powershell/pull/2828)
4848
- Added `Undo-PnPFileCheckedOut` which allows a checked out file to discard its changes and revert to the last checked in version. [#2837](https://github.com/pnp/powershell/pull/2837)
49+
- Added support for specifying the `-ContentUrl` configuration in `Add-PnPTeamsTab` cmdlet when trying to add a Planner as a tab in Teams channel.
4950

5051
### Changed
5152

MIGRATE-1.0-to-2.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ Using PnP PowerShell in Azure functions ? You might be required to change the Pn
8181

8282
## Changes to output type
8383

84+
- When using `Add-PnPTeamsTab` cmdlet, if you specify the `-Type SharePointPageAndList`, then `-WebSiteUrl` is mandatory.
85+
- When using `Add-PnPTeamsTab` cmdlet, if you specify the `-Type Planner`, then `-ContentUrl` is mandatory.
8486
- The output type of `Get-PnPAzureADGroupOwner` has changed to `PnP.PowerShell.Commands.Model.Microsoft365User`
8587
- The output type of `Get-PnPAzureADGroupMember` has changed to `PnP.PowerShell.Commands.Model.Microsoft365User`
8688
- The output type of `Get-PnPAzureADGroup` has changed to `PnP.PowerShell.Commands.Model.Graph.Group`

src/Commands/Teams/AddTeamsTab.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public class AddTeamsTab : PnPGraphCmdlet, IDynamicParameters
3030
private DocumentLibraryParameters documentLibraryParameters;
3131
private SharePointPageAndListParameters sharePointPageAndListParameters;
3232
private CustomParameters customParameters;
33+
3334
public object GetDynamicParameters()
3435
{
3536
switch (Type)
@@ -43,14 +44,15 @@ public object GetDynamicParameters()
4344
return officeFileParameters;
4445
}
4546
case TeamTabType.DocumentLibrary:
47+
case TeamTabType.Planner:
4648
case TeamTabType.WebSite:
4749
{
4850
documentLibraryParameters = new DocumentLibraryParameters();
4951
return documentLibraryParameters;
5052
}
5153
case TeamTabType.SharePointPageAndList:
5254
{
53-
sharePointPageAndListParameters= new SharePointPageAndListParameters();
55+
sharePointPageAndListParameters = new SharePointPageAndListParameters();
5456
return sharePointPageAndListParameters;
5557
}
5658
case TeamTabType.Custom:
@@ -90,6 +92,7 @@ protected override void ExecuteCmdlet()
9092
break;
9193
}
9294
case TeamTabType.DocumentLibrary:
95+
case TeamTabType.Planner:
9396
case TeamTabType.WebSite:
9497
{
9598
EnsureDynamicParameters(documentLibraryParameters);

src/Commands/Utilities/TeamsUtility.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,8 @@ public static async Task<TeamTab> AddTabAsync(PnPConnection connection, string a
908908
case TeamTabType.Planner:
909909
{
910910
tab.TeamsAppId = "com.microsoft.teamspace.tab.planner";
911+
tab.Configuration = new TeamTabConfiguration();
912+
tab.Configuration.ContentUrl = contentUrl;
911913
break;
912914
}
913915
case TeamTabType.MicrosoftStream:

0 commit comments

Comments
 (0)