Files.SelectedOperations.Selected
Allow the application to access a subset of files without a signed in user. The specific files and the permissions granted will be configured in SharePoint Online or OneDrive.
Permission Details
Access selected Files without a signed in user.
Allow the application to access a subset of files without a signed in user. The specific files and the permissions granted will be configured in SharePoint Online or OneDrive.
bd61925e-3bf4-4d62-bc0b-06b06c96d95c
Access selected Files, on behalf of the signed-in user
Allow the application to access files explicitly permissioned to the application on behalf of the signed in user. The specific files and the permissions granted will be configured in SharePoint Online or OneDrive.
ef2779dc-ef1b-4211-8310-8a0ac2450081
Properties
Properties is shown from stable Microsoft Graph v1.0 metadata.
| Property | Type | Description |
|---|---|---|
audio |
[audio][] |
Audio metadata, if the item is an audio file. Read-only. Read-only. Only on OneDrive Personal. |
bundle |
[bundle][] |
Bundle metadata, if the item is a bundle. Read-only. |
content |
StreamNullable |
The content stream, if the item represents a file. |
createdBy |
[identitySet][] |
Identity of the user, device, and application that created the item. Read-only. |
createdDateTime |
DateTimeOffset |
Date and time of item creation. Read-only. |
cTag |
StringNullable |
An eTag for the content of the item. This eTag isn't changed if only the metadata is changed. Note This property isn't returned if the item is a folder. Read-only. |
deleted |
[deleted][] |
Information about the deleted state of the item. Read-only. |
description |
StringNullable |
Provides a user-visible description of the item. Read-write. Only on OneDrive Personal. |
eTag |
StringNullable |
eTag for the entire item (metadata + content). Read-only. |
file |
[file][] |
File metadata, if the item is a file. Read-only. |
fileSystemInfo |
[fileSystemInfo][] |
File system information on client. Read-write. |
folder |
[folder][] |
Folder metadata, if the item is a folder. Read-only. |
id |
String |
The unique identifier of the item within the Drive. Read-only. |
image |
[image][] |
Image metadata, if the item is an image. Read-only. |
lastModifiedBy |
[identitySet][] |
Identity of the user, device, and application that last modified the item. Read-only. |
Showing 15 of 45 properties.
JSON Representation
JSON representation is shown from stable Microsoft Graph v1.0 metadata.
{
"audio": { "@odata.type": "microsoft.graph.audio" },
"bundle": { "@odata.type": "microsoft.graph.bundle" },
"content": { "@odata.type": "Edm.Stream" },
"cTag": "string (etag)",
"deleted": { "@odata.type": "microsoft.graph.deleted"},
"description": "string",
"file": { "@odata.type": "microsoft.graph.file" },
"fileSystemInfo": { "@odata.type": "microsoft.graph.fileSystemInfo" },
"folder": { "@odata.type": "microsoft.graph.folder" },
"image": { "@odata.type": "microsoft.graph.image" },
"location": { "@odata.type": "microsoft.graph.geoCoordinates" },
"malware": { "@odata.type": "microsoft.graph.malware" },
"package": { "@odata.type": "microsoft.graph.package" },
"pendingOperations": { "@odata.type": "microsoft.graph.pendingOperations" },
"photo": { "@odata.type": "microsoft.graph.photo" },
"publication": {"@odata.type": "microsoft.graph.publicationFacet"},
"remoteItem": { "@odata.type": "microsoft.graph.remoteItem" },
"root": { "@odata.type": "microsoft.graph.root" },
"searchResult": { "@odata.type": "microsoft.graph.searchResult" },
"shared": { "@odata.type": "microsoft.graph.shared" },
"sharepointIds": { "@odata.type": "microsoft.graph.sharepointIds" },
"size": 1024,
"specialFolder": { "@odata.type": "microsoft.graph.specialFolder" },
"video": { "@odata.type": "microsoft.graph.video" },
"webDavUrl": "string",
/* relationships */
"activities": [{"@odata.type": "microsoft.graph.itemActivity"}],
"analytics": {"@odata.type": "microsoft.graph.itemAnalytics"},
"children": [{ "@odata.type": "microsoft.graph.driveItem" }],
"createdByUser": { "@odata.type": "microsoft.graph.user" },
"retentionLabel": { "@odata.type": "microsoft.graph.itemRetentionLabel" },
"lastModifiedByUser": { "@odata.type": "microsoft.graph.user" },
"permissions": [ {"@odata.type": "microsoft.graph.permission"} ],
"subscriptions": [ {"@odata.type": "microsoft.graph.subscription"} ],
"thumbnails": [ {"@odata.type": "microsoft.graph.thumbnailSet"}],
"versions": [ {"@odata.type": "microsoft.graph.driveItemVersion"}],
/* inherited from baseItem */
"createdBy": {"@odata.type": "microsoft.graph.identitySet"},
"createdDateTime": "String (timestamp)",
"eTag": "string",
"id": "string (identifier)",
"lastModifiedBy": {"@odata.type": "microsoft.graph.identitySet"},
"lastModifiedDateTime": "String (timestamp)",
"name": "string",
"parentReference": {"@odata.type": "microsoft.graph.itemReference"},
"webUrl": "string",
/* instance annotations */
"@microsoft.graph.conflictBehavior": "string",
"@microsoft.graph.downloadUrl": "url",
"@microsoft.graph.sourceUrl": "url"
}
Relationships
Relationships is shown from stable Microsoft Graph v1.0 metadata.
| Relationship | Type | Description |
|---|---|---|
activities |
[itemActivity][] collection |
The list of recent activities that took place on this item. |
analytics |
[itemAnalytics][] resource |
Analytics about the view activities that took place on this item. |
children |
driveItem collection |
Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. |
createdByUser |
[user][] |
Identity of the user who created the item. Read-only. |
lastModifiedByUser |
[user][] |
Identity of the user who last modified the item. Read-only. |
listItem |
[listItem][] |
For drives in SharePoint, the associated document library list item. Read-only. Nullable. |
permissions |
[permission][] collection |
The set of permissions for the item. Read-only. Nullable. |
retentionLabel |
[itemRetentionLabel][] |
Information about retention label and settings enforced on the driveItem. Read-write. |
subscriptions |
[subscription][] collection |
The set of subscriptions on the item. Only supported on the root of a drive. |
thumbnails |
[thumbnailSet][] collection |
Collection of [thumbnailSet][] objects associated with the item. For more information, see [getting thumbnails][]. Read-only. Nullable. |
versions |
[driveItemVersion][] collection |
The list of previous versions of the item. For more info, see [getting previous versions][]. Read-only. Nullable. |
workbook |
[workbook][] |
For files that are Excel spreadsheets, access to the workbook API to work with the spreadsheet's contents. Nullable. |
photo |
object |
Photo metadata, if the item is a photo. Read-only. |
extensions |
extension collection |
The collection of open extensions defined for this item. Nullable. |
Graph Methods
Microsoft Graph v1.0 endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
No API methods available for this version.
Microsoft Graph beta endpoints are mapped directly from refreshed Microsoft Learn permissions tables.
Microsoft Graph PowerShell v1.0 commands are mapped directly from refreshed Microsoft Learn PowerShell snippets.
No deterministic PowerShell command map is available for this permission.
Browse PowerShell docsCode Examples
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new Permission
{
GrantedToV2 = new SharePointIdentitySet
{
Application = new Identity
{
Id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e",
},
},
Roles = new List<string>
{
"write",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Drives["{drive-id}"].Items["{driveItem-id}"].Permissions.PostAsync(requestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const permission = {
grantedToV2: {
application: {
id: '89ea5c94-7736-4e25-95ad-3fa95f62b66e'
}
},
roles: ['write']
};
await client.api('/drives/b!s8RqPCGh0ESQS2EYnKM0IKS3lM7GxjdAviiob7oc5pXv_0LiL-62Qq3IXyrXnEop/items/01V4EPHZNV2OJQJNBPWNCKDTXCQ5TSVBJU/permissions')
.version('beta')
.post(permission);
Import-Module Microsoft.Graph.Beta.Files
$params = @{
grantedToV2 = @{
application = @{
id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e"
}
}
roles = @(
"write"
)
}
New-MgBetaDriveItemPermission -DriveId $driveId -DriveItemId $driveItemId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.permission import Permission
from msgraph_beta.generated.models.share_point_identity_set import SharePointIdentitySet
from msgraph_beta.generated.models.identity import Identity
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = Permission(
granted_to_v2 = SharePointIdentitySet(
application = Identity(
id = "89ea5c94-7736-4e25-95ad-3fa95f62b66e",
),
),
roles = [
"write",
],
)
result = await graph_client.drives.by_drive_id('drive-id').items.by_drive_item_id('driveItem-id').permissions.post(request_body)
App Registration
Navigate to Azure Portal
Go to App registrations in Microsoft Entra admin center
Add API Permission
Select your app → API permissions → Add a permission → Microsoft Graph
Select Permission Type
Choose Application permissions or delegated permissions and search for Files.SelectedOperations.Selected
Grant Admin Consent
Application permissions always require admin consent.