Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/pnp/cli-microsoft365 into e…
Browse files Browse the repository at this point in the history
…ventreceiverlist
  • Loading branch information
Mathijs Verbeeck committed May 22, 2022
2 parents 569c68d + 2a76d05 commit 3aca3da
Show file tree
Hide file tree
Showing 39 changed files with 2,412 additions and 20 deletions.
16 changes: 16 additions & 0 deletions docs/docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,30 @@

**Planner:**

- [planner task reference add](../cmd/planner/task/task-reference-add.md) - adds a new reference to a Planner task [#3283](https://github.com/pnp/cli-microsoft365/issues/3283)
- [planner task reference list](../cmd/planner/task/task-reference-list.md) - retrieve the references associated to a Planner task [#3284](https://github.com/pnp/cli-microsoft365/issues/3284)
- [planner bucket get](../cmd/planner/bucket/bucket-get.md) - retrieves a planner bucket [#3226](https://github.com/pnp/cli-microsoft365/issues/3226)
- [planner bucket remove](../cmd/planner/bucket/bucket-remove.md) - removes a Microsoft Planner bucket from a plan [#2742](https://github.com/pnp/cli-microsoft365/issues/2742)

**Power Platform:**

- [pp gateway list](../cmd/pp/gateway/gateway-list.md) - returns a list of gateways for which the user is an admin [#3276](https://github.com/pnp/cli-microsoft365/issues/3276)

**SharePoint Online:**

- [spo eventreceiver get](../cmd/spo/eventreceiver/eventreceiver-get.md) - retrieves specific event receiver for a web, site or list [#3308](https://github.com/pnp/cli-microsoft365/issues/3308)
- [spo field list](../cmd/spo/field/field-list.md) - retrieves columns for the specified list or site [#2695](https://github.com/pnp/cli-microsoft365/issues/2695)
- [spo list roleinheritance break](../cmd/spo/list/list-roleinheritance-break.md) - breaks role inheritance on list or library [#3198](https://github.com/pnp/cli-microsoft365/issues/3198)
- [spo list roleinheritance reset](../cmd/spo/list/list-roleinheritance-reset.md) - restores role inheritance on list or library [#3220](https://github.com/pnp/cli-microsoft365/issues/3220)
- [spo list view add](../cmd/spo/list/list-view-add.md) - adds a new view to a SharePoint list [#1834](https://github.com/pnp/cli-microsoft365/issues/1834)
- [spo listitem roleinheritance break](../cmd/spo/listitem/listitem-roleinheritance-break.md) - breaks inheritance of list item [#3199](https://github.com/pnp/cli-microsoft365/issues/3199)
- [spo listitem roleinheritance reset](../cmd/spo/listitem/listitem-roleinheritance-reset.md) - restores the role inheritance of list item, file, or folder [#3238](https://github.com/pnp/cli-microsoft365/issues/3238)
- [spo roledefinition list](../cmd/spo/roledefinition/roledefinition-list.md) - gets list of role definitions for the specified site [#3237](https://github.com/pnp/cli-microsoft365/issues/3237)

**Search:**

- [search externalConnections list](../cmd/search/externalconnection/externalconnection-list.md) - lists external connections defined in Microsoft Search [#2790](https://github.com/pnp/cli-microsoft365/issues/2790)

**Tenant:**

- [tenant security alerts list](../cmd/tenant/security/security-alerts-list.md) - gets the security alerts for a tenant [#2635](https://github.com/pnp/cli-microsoft365/issues/2635)
Expand All @@ -36,6 +48,10 @@
- added app only token check to planner commands [#3265](https://github.com/pnp/cli-microsoft365/issues/3265)
- added Planner utilities class [#3268](https://github.com/pnp/cli-microsoft365/issues/3268)
- extended 'aad app add' and 'aad app set' with certificates [#3115](https://github.com/pnp/cli-microsoft365/issues/3115), [#3116](https://github.com/pnp/cli-microsoft365/issues/3116)
- fixes documentation app open in wrong place [#3316](https://github.com/pnp/cli-microsoft365/issues/3316)
- extended teams channel member with check for private channel [#3254](https://github.com/pnp/cli-microsoft365/issues/3254)
- updates documentation titles [#3310](https://github.com/pnp/cli-microsoft365/issues/3310)
- follow the order of properties as defined in defaultProperties [#2008](https://github.com/pnp/cli-microsoft365/issues/2008)

## [v5.2.0](https://github.com/pnp/cli-microsoft365/releases/tag/v5.2.0)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# aad approleassignment add
# aad approleassignment remove

Deletes an app role assignment for the specified Azure AD Application Registration

Expand Down
45 changes: 45 additions & 0 deletions docs/docs/cmd/planner/task/task-reference-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# planner task reference add

Adds a new reference to a Planner task.

## Usage

```sh
m365 planner task reference add [options]
```

## Options

`-i, --taskId <taskId>`
: ID of the task.

`-u, --url <url>`
: URL location of the reference.

`--alias [alias]`
: A name alias to describe the reference.

`--type [type]`
: Used to describe the type of the reference. Types include: `PowerPoint`, `Word`, `Excel`, `Other`.

--8<-- "docs/cmd/_global.md"

## Examples

Add a new reference with the url _https://www.microsoft.com_ to a Planner task with the id _2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2_

```sh
m365 planner task reference add --taskId "2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2" --url "https://www.microsoft.com"
```

Add a new reference with the url _https://www.microsoft.com_ and with the alias _Parker_ to a Planner task with the id _2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2_

```sh
m365 planner task reference add --taskId "2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2" --url "https://www.microsoft.com" --alias "Parker"
```

Add a new reference with the url _https://www.microsoft.com_ and with the type Excel to a Planner task with the id _2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2_

```sh
m365 planner task reference add --taskId "2Vf8JHgsBUiIf-nuvBtv-ZgAAYw2" --url "https://www.microsoft.com" --type "Excel"
```
24 changes: 24 additions & 0 deletions docs/docs/cmd/planner/task/task-reference-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# planner task reference list

Retrieve the references associated to a Planner task.

## Usage

```sh
m365 planner task reference list [options]
```

## Options

`-i, --taskId <taskId>`
: ID of the task to retrieve references from

--8<-- "docs/cmd/_global.md"

## Examples

Retrieve the references of the specified planner task

```sh
m365 planner task reference list --taskId uBk5fK_MHkeyuPYlCo4OFpcAM
```
21 changes: 21 additions & 0 deletions docs/docs/cmd/pp/gateway/gateway-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# pp gateway list

Returns a list of gateways for which the user is an admin

## Usage

```sh
m365 pp gateway list [options]
```

## Options

--8<-- "docs/cmd/_global.md"

## Examples

List gateways for which the user is an admin

```sh
m365 pp gateway list
```
21 changes: 21 additions & 0 deletions docs/docs/cmd/search/externalconnection/externalconnection-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# search externalconnection list

Lists external connections defined in Microsoft Search

## Usage

```sh
m365 search externalconnection list [options]
```

## Options

--8<-- "docs/cmd/_global.md"

## Examples

List external connections defined in Microsoft Search

```sh
m365 search externalconnection list
```
70 changes: 70 additions & 0 deletions docs/docs/cmd/spo/eventreceiver/eventreceiver-get.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# spo eventreceiver get

Retrieves specific event receiver for the specified web, site or list by event receiver name or id.

## Usage

```sh
m365 spo eventreceiver get [options]
```

## Options

`-u, --webUrl <webUrl>`
: The URL of the web for which to retrieve the event receivers.

`--listTitle [listTitle]`
: The title of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_.
Specify either `listTitle`, `listId` or `listUrl`.

`--listId [listId]`
: The id of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_.
Specify either `listTitle`, `listId` or `listUrl`.

`--listUrl [listUrl]`
: The url of the list for which to retrieve the event receivers, _if the event receivers should be retrieved from a list_.
Specify either `listTitle`, `listId` or `listUrl`.

`-n, --name [name]`
The name of the event receiver to retrieve. Specify either `name` or `id` but not both.

`-i, --id [id]`
The id of the event receiver to retrieve. Specify either `name` or `id` but not both.

`-s, --scope [scope]`
: The scope of which to retrieve the Event Receivers.
Can be either "site" or "web". Defaults to "web". Only applicable when not specifying any of the list properties.

--8<-- "docs/cmd/_global.md"

## Examples

Retrieve event receivers in web _<https://contoso.sharepoint.com/sites/contoso-sales>_ with name _PnP Test Receiver_.

```sh
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --name 'PnP Test Receiver'
```

Retrieve event receivers in site _<https://contoso.sharepoint.com/sites/contoso-sales>_ with id _c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec_.

```sh
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --scope site --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec
```

Retrieve event receivers for list with title _Events_ in web _<https://contoso.sharepoint.com/sites/contoso-sales>_ with name _PnP Test Receiver_.

```sh
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listTitle Events --name 'PnP Test Receiver'
```

Retrieve event receivers for list with ID _202b8199-b9de-43fd-9737-7f213f51c991_ in web _<https://contoso.sharepoint.com/sites/contoso-sales>_ with id _c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec_.

```sh
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listId '202b8199-b9de-43fd-9737-7f213f51c991' --id c5a6444a-9c7f-4a0d-9e29-fc6fe30e34ec
```

Retrieve event receivers for list with url _/sites/contoso-sales/lists/Events_ in web _<https://contoso.sharepoint.com/sites/contoso-sales>_ with name _PnP Test Receiver_.

```sh
m365 spo eventreceiver list --webUrl https://contoso.sharepoint.com/sites/contoso-sales --listUrl '/sites/contoso-sales/lists/Events' --name 'PnP Test Receiver'
```
67 changes: 67 additions & 0 deletions docs/docs/cmd/spo/list/list-view-add.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# spo list view add

Adds a new view to a SharePoint list

## Usage

```sh
m365 spo list view add [options]
```

## Options

`-u, --webUrl <webUrl>`
: URL of the site where the list is located.

`--listId [listId]`
: ID of the list to which the view should be added. Specify either `listId`, `listTitle` or `listUrl` but not multiple.

`--listTitle [listTitle]`
: Title of the list to which the view should be added. Specify either `listId`, `listTitle` or `listUrl` but not multiple.

`--listUrl [listUrl]`
: Relative URL of the list to which the view should be added. Specify either `listId`, `listTitle` or `listUrl` but not multiple.

`--title <title>`
: Title of the view to be created for the list.

`--fields <fields>`
: Comma-separated list of **case-sensitive** internal names of the fields to add to the view.

`--personal`
: View will be created as personal view, if specified.

`--default`
: View will be set as default view, if specified.

`--paged`
: View supports paging, if specified (recommended to use this).

`--rowLimit [rowLimit]`
: Sets the number of items to display for the view. Default value is 30.

--8<-- "docs/cmd/_global.md"

## Remarks

We recommend using the `paged` option. When specified, the view supports displaying more items page by page (default behavior). When not specified, the `rowLimit` is absolute, and there is no link to see more items.

## Examples

Add a view called _All events_ to a list with specific title.

```sh
spo list view add --webUrl https://contoso.sharepoint.com/sites/project-x --listTitle "My List" --title "All events" --fields "FieldName1,FieldName2,Created,Author,Modified,Editor" --paged
```

Add a view as default view with title _All events_ to a list with a specific URL.

```sh
spo list view add --webUrl https://contoso.sharepoint.com/sites/project-x --listUrl "/Lists/MyList" --title "All events" --fields "FieldName1,Created" --paged --default
```

Add a personal view called _All events_ to a list with a specific ID.

```sh
spo list view add --webUrl https://contoso.sharepoint.com/sites/project-x --listId 00000000-0000-0000-0000-000000000000 --title "All events" --fields "FieldName1,Created" --paged --personal
```
2 changes: 1 addition & 1 deletion docs/docs/cmd/spo/userprofile/userprofile-get.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# spo userprofile set
# spo userprofile get

Get SharePoint user profile properties for the specified user

Expand Down
17 changes: 12 additions & 5 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ nav:
- Azure Active Directory (aad):
- app:
- app add: 'cmd/aad/app/app-add.md'
- app get: 'cmd/aad/app/app-get.md'
- app open: 'cmd/aad/app/app-open.md'
- app get: 'cmd/aad/app/app-get.md'
- app remove: 'cmd/aad/app/app-remove.md'
- app role add: 'cmd/aad/app/app-role-add.md'
- app role list: 'cmd/aad/app/app-role-list.md'
Expand Down Expand Up @@ -119,6 +118,7 @@ nav:
- list: 'cmd/file/file-list.md'
- Microsoft 365 apps (app):
- get: 'cmd/app/app-get.md'
- open: 'cmd/app/app-open.md'
- permission:
- permission list: 'cmd/app/permission/permission-list.md'
- Microsoft 365 tenant (tenant):
Expand Down Expand Up @@ -190,15 +190,17 @@ nav:
- bucket remove: 'cmd/planner/bucket/bucket-remove.md'
- plan:
- plan add: 'cmd/planner/plan/plan-add.md'
- plan get: 'cmd/planner/plan/plan-get.md'
- plan details get: 'cmd/planner/plan/plan-details-get.md'
- plan get: 'cmd/planner/plan/plan-get.md'
- plan list: 'cmd/planner/plan/plan-list.md'
- task:
- task add: 'cmd/planner/task/task-add.md'
- task details get: 'cmd/planner/task/task-details-get.md'
- task get: 'cmd/planner/task/task-get.md'
- task list: 'cmd/planner/task/task-list.md'
- task reference add: 'cmd/planner/task/task-reference-add.md'
- task reference list: 'cmd/planner/task/task-reference-list.md'
- task set: 'cmd/planner/task/task-set.md'
- task details get: 'cmd/planner/task/task-details-get.md'
- Power Apps (pa):
- app:
- app get: 'cmd/pa/app/app-get.md'
Expand Down Expand Up @@ -235,13 +237,16 @@ nav:
- run resubmit: 'cmd/flow/run/run-resubmit.md'
- Power Platform (pp):
- environment:
- environment list: 'cmd/pp/environment/environment-list.md'
- environment list: 'cmd/pp/environment/environment-list.md'
- gateway:
- gateway list: 'cmd/pp/gateway/gateway-list.md'
- managementapp:
- managementapp add: 'cmd/pp/managementapp/managementapp-add.md'
- managementapp list: 'cmd/pp/managementapp/managementapp-list.md'
- Search (search):
- externalconnection:
- externalconnection add: 'cmd/search/externalconnection/externalconnection-add.md'
- externalconnection list: 'cmd/search/externalconnection/externalconnection-list.md'
- Skype (skype):
- report:
- report activitycounts: 'cmd/skype/report/report-activitycounts.md'
Expand Down Expand Up @@ -300,6 +305,7 @@ nav:
- customaction remove: 'cmd/spo/customaction/customaction-remove.md'
- customaction set: 'cmd/spo/customaction/customaction-set.md'
- eventreceiver:
- eventreceiver get: 'cmd/spo/eventreceiver/eventreceiver-get.md'
- eventreceiver list: 'cmd/spo/eventreceiver/eventreceiver-list.md'
- externaluser:
- externaluser list: 'cmd/spo/externaluser/externaluser-list.md'
Expand Down Expand Up @@ -376,6 +382,7 @@ nav:
- list label get: 'cmd/spo/list/list-label-get.md'
- list label set: 'cmd/spo/list/list-label-set.md'
- list sitescript get: 'cmd/spo/list/list-sitescript-get.md'
- list view add: 'cmd/spo/list/list-view-add.md'
- list view get: 'cmd/spo/list/list-view-get.md'
- list view list: 'cmd/spo/list/list-view-list.md'
- list view remove: 'cmd/spo/list/list-view-remove.md'
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
"Lingstuyl, Martin <martin@i4-you.com>",
"Maillot, Michaël <battosaimykle@gmail.com>",
"Mastykarz, Waldek <waldek@mastykarz.nl>",
"Mathijs Verbeeck <verbeeckmathijs@gmail.com>",
"McDonnell, Kevin <kevin@mcd79.com>",
"Menon, Arjun <arjun.umenon@gmail.com>",
"Moujahid, Abderahman <rags_place@hotmail.com>",
Expand Down
4 changes: 4 additions & 0 deletions src/Auth.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2065,6 +2065,10 @@ describe('Auth', () => {
assert.strictEqual(Auth.getResourceFromUrl('https://api.bap.microsoft.com'), 'https://management.azure.com/');
});

it('correctly retrieves resource for https://api.powerbi.com', () => {
assert.strictEqual(Auth.getResourceFromUrl('https://api.powerbi.com'), 'https://analysis.windows.net/powerbi/api');
});

it('returns undefined if access token is not set when determining auth type', () => {
assert.strictEqual(Auth.isAppOnlyAuth(''), undefined);
});
Expand Down

0 comments on commit 3aca3da

Please sign in to comment.