Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds command purview threatassessment list, Closes #4426 #4517

Closed
110 changes: 110 additions & 0 deletions docs/docs/cmd/purview/threatassessment/threatassessment-list.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import Global from '/docs/cmd/_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# purview threatassessment list

Get a list of threat assessments

## Usage

```sh
m365 purview threatassessment list [options]
```

## Options

```md definition-list
`-t, --type [type]`
: The type of threat assessment to retrieve. Allowed values are `mail`, `file`, `emailFile` and `url`.
```

<Global />

## Examples

Get a list of threat assessments

```sh
m365 purview threatassessment list
```

Get a list of threat assessments of type _mail_

```sh
m365 purview threatassessment list --type mail
```

## Response

<Tabs>
<TabItem value="JSON">

```json
[
{
"type": "mail",
"id": "49c5ef5b-1f65-444a-e6b9-08d772ea2059",
"createdDateTime": "2019-11-27T03:30:18.6890937Z",
"contentType": "mail",
"expectedAssessment": "block",
"category": "spam",
"status": "pending",
"requestSource": "administrator",
"recipientEmail": "[email protected]",
"destinationRoutingReason": "notJunk",
"messageUri": "https://graph.microsoft.com/v1.0/users/c52ce8db-3e4b-4181-93c4-7d6b6bffaf60/messages/AAMkADU3MWUxOTU0LWNlOTEt=",
"createdBy": {
"user": {
"id": "c52ce8db-3e4b-4181-93c4-7d6b6bffaf60",
"displayName": "John Doe"
}
}
}
];
```

</TabItem>
<TabItem value="Text">

```text
id type category
------------------------------------ ----------- --------
49c5ef5b-1f65-444a-e6b9-08d772ea2059 mail spam
```

</TabItem>
<TabItem value="CSV">

```csv
id,type,category
49c5ef5b-1f65-444a-e6b9-08d772ea2059,mail,spam
```

</TabItem>
<TabItem value="Markdown">

```md
# purview threatassessment list

Date: 16/2/2023

## a47e428c-a7bd-4cf2-f061-08db0f58b736

Property | Value
---------|-------
type | mail
id | 49c5ef5b-1f65-444a-e6b9-08d772ea2059
createdDateTime | 2019-11-27T03:30:18.6890937Z
contentType | mail
expectedAssessment | block
category | spam
status | pending
recipientEmail | [email protected]
destinationRoutingReason | notJunk
messageUri | https://graph.microsoft.com/v1.0/users/c52ce8db-3e4b-4181-93c4-7d6b6bffaf60/messages/AAMkADU3MWUxOTU0LWNlOTEt=
createdBy | {"user":{"id":"c52ce8db-3e4b-4181-93c4-7d6b6bffaf60","displayName":"John Doe"}}
```

</TabItem>
</Tabs>
5 changes: 5 additions & 0 deletions docs/src/config/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1819,6 +1819,11 @@ const sidebars: SidebarsConfig = {
type: 'doc',
label: 'threatassessment get',
id: 'cmd/purview/threatassessment/threatassessment-get'
},
{
type: 'doc',
label: 'threatassessment list',
id: 'cmd/purview/threatassessment/threatassessment-list'
}
]
}
Expand Down
3 changes: 2 additions & 1 deletion src/m365/purview/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ export default {
SENSITIVITYLABEL_GET: `${prefix} sensitivitylabel get`,
SENSITIVITYLABEL_LIST: `${prefix} sensitivitylabel list`,
SENSITIVITYLABEL_POLICYSETTINGS_LIST: `${prefix} sensitivitylabel policysettings list`,
THREATASSESSMENT_GET: `${prefix} threatassessment get`
THREATASSESSMENT_GET: `${prefix} threatassessment get`,
THREATASSESSMENT_LIST: `${prefix} threatassessment list`
};
Loading
Loading