Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions docs/docs/cmd/exo/approleassignment/approleassignment-add.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,25 @@ To use this command you must be at least **Privileged Role Administrator**.

:::

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|------------------------------|
| Microsoft Graph | RoleManagement.ReadWrite.Exchange |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|------------------------------|
| Microsoft Graph | RoleManagement.ReadWrite.Exchange |

</TabItem>
</Tabs>

## Examples

Assign a role specified by id to a service principal specified by id and scope the assignment to the whole tenant
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/cmd/file/convert/convert-pdf.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Global from '../../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# file convert pdf

Expand Down Expand Up @@ -30,6 +32,25 @@ If you choose to store the converted file in a document library, CLI will store

If the conversion process fails, CLI will attempt to clean up the temporary files (the source file uploaded to your tenant, if you're converting a local file to PDF, and the converted PDF file on your disk if you chose to upload the converted file to your tenant). If removing the temporary files fails, you will need to clean them up yourself. CLI will list the URL and/or path of the files to remove.

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|---------------------------------|
| Microsoft Graph | Files.ReadWrite, Sites.Read.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|-------------------------------------|
| Microsoft Graph | Files.ReadWrite.All, Sites.Read.All |

</TabItem>
</Tabs>

## Examples

Converts local file to PDF and stores the converted file on the disk
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/cmd/file/file-add.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Global from '../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# file add

Expand Down Expand Up @@ -31,6 +33,25 @@ The `folderUrl` must be an absolute URL to the document library where the file s

By default, the `file add` command will automatically lookup the ID of the site where you want to upload the file based on the specified `folderUrl`. It will do this, by breaking the URL into chunks and incrementally calling Microsoft Graph to retrieve site information. This is necessary, because there is no other way looking at the URL to distinguish where the site URL ends and the document library URL starts. If you want to speed up uploading files, or you use resource-specific consent and your Microsoft Entra app only has access to the specific site, you can use the `siteUrl` option to specify the URL of the site yourself.

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|----------------------------------|
| Microsoft Graph | Files.ReadWrite, Sites.ReadWrite.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Sites.ReadWrite.All |

</TabItem>
</Tabs>

## Examples

Uploads file from the current folder to the root folder of a document library in the root site collection
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/cmd/file/file-copy.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Global from '../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# file copy

Expand Down Expand Up @@ -31,6 +33,25 @@ m365 file copy [options]

<Global />

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Sites.ReadWrite.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Sites.ReadWrite.All |

</TabItem>
</Tabs>

## Examples

Copy a file by server-relative URL to a document library in another site collection with server relative URL
Expand Down
19 changes: 19 additions & 0 deletions docs/docs/cmd/file/file-list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,25 @@ m365 file list [options]

This command is an improved version of the `spo file list` command. The main difference between the two commands is, that `file list` uses Microsoft Graph and properly supports retrieving files from large folders. Because `file list` uses Microsoft Graph and `spo file list` uses SharePoint REST APIs, the data returned by both commands is different.

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|----------------------------|
| Microsoft Graph | Files.Read, Sites.Read.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|--------------------------------|
| Microsoft Graph | Files.Read.All, Sites.Read.All |

</TabItem>
</Tabs>

## Examples

Return all files from the folder _Shared Documents_ located in site _https://contoso.sharepoint.com/sites/project-x_
Expand Down
21 changes: 21 additions & 0 deletions docs/docs/cmd/file/file-move.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import Global from '../_global.mdx';
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# file move

Expand Down Expand Up @@ -36,6 +38,25 @@ m365 file move [options]
- If the source and target locations are within the same document library or drive, the command will utilize the Move DriveItem API, preserving the version history of the file.
- If the source and target locations are in different document libraries or drives, the command will use a copy-and-delete combination to move the file. Please note that in this case, version history will not be retained.

## Permissions

<Tabs>
<TabItem value="Delegated">

| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Sites.ReadWrite.All |

</TabItem>
<TabItem value="Application">

| Resource | Permissions |
|-----------------|---------------------|
| Microsoft Graph | Sites.ReadWrite.All |

</TabItem>
</Tabs>

## Examples

Move a file by server-relative URL to a folder in the same document library
Expand Down