Interface IGraphPermission
The permission resource provides information about a sharing permission granted for a driveItem resource. Sharing permissions have a number of different forms. The permission resource represents these different forms through facets on the resource. Note: OneDrive for Business and SharePoint document libraries do not return the inheritedFrom property. grantedTo and grantedToIdentities will be deprecated going forward and the response will be migrated to grantedToV2 and grantedToIdentitiesV2 respectively under appropriate property names.
public interface IGraphPermission : IDataModel<IGraphPermission>, IDataModelParent, IDataModelWithContext, ISupportModules<IGraphPermission>
- Inherited Members
- Extension Methods
Properties
ExpirationDateTime
A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there is no expiration set for this permission. Optional.
DateTime ExpirationDateTime { get; }
Property Value
GrantedToIdentitiesV2
For link type permissions, the details of the users to whom permission was granted. Note: Read-only.
List<ISharePointIdentitySet> GrantedToIdentitiesV2 { get; }
Property Value
GrantedToV2
For user type permissions, the details of the users and applications for this permission. Note: Read-only.
ISharePointIdentitySet GrantedToV2 { get; }
Property Value
HasPassword
Indicates whether the password is set for this permission. Note: This property only appears in the response. Optional. Read-only. For OneDrive Personal only.
bool HasPassword { get; }
Property Value
Id
The unique identifier of the permission among all permissions on the item. Note: Read-only.
string Id { get; }
Property Value
Invitation
Details of any associated sharing invitation for this permission. Note: Read-only.
ISharingInvitation Invitation { get; }
Property Value
Link
Provides the link details of the current permission, if it is a link type permissions. Note: Read-only.
ISharingLink Link { get; }
Property Value
Roles
The type of permission
List<PermissionRole> Roles { get; }
Property Value
ShareId
A unique token that can be used to access this shared item via the shares API. Note: Read-only.
string ShareId { get; }
Property Value
Methods
DeletePermission()
Delete a specific permission
void DeletePermission()
DeletePermissionAsync()
Delete a specific permission
Task DeletePermissionAsync()
Returns
GrantUserPermissions(List<IDriveRecipient>)
Adds permissions for a set of users to a specific permission
IGraphPermission GrantUserPermissions(List<IDriveRecipient> recipients)
Parameters
recipientsList<IDriveRecipient>List of recipients to add
Returns
GrantUserPermissionsAsync(List<IDriveRecipient>)
Adds permissions for a set of users to a specific permission
Task<IGraphPermission> GrantUserPermissionsAsync(List<IDriveRecipient> recipients)
Parameters
recipientsList<IDriveRecipient>List of recipients to add
Returns
RemoveUserPermissions(List<IDriveRecipient>)
Removes permissions for a set of users from a specific permission
IGraphPermission RemoveUserPermissions(List<IDriveRecipient> recipients)
Parameters
recipientsList<IDriveRecipient>List of recipients to remove
Returns
RemoveUserPermissionsAsync(List<IDriveRecipient>)
Removes permissions for a set of users from a specific permission
Task<IGraphPermission> RemoveUserPermissionsAsync(List<IDriveRecipient> recipients)
Parameters
recipientsList<IDriveRecipient>List of recipients to remove