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.
Inherited Members
Namespace: PnP.Core.Model.Security
Assembly: PnP.Core.dll
Syntax
public interface IGraphPermission : IDataModel<IGraphPermission>, IDataModelParent, IDataModelWithContext, ISupportModules<IGraphPermission>
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.
Declaration
DateTime ExpirationDateTime { get; }
Property Value
DateTime
|
GrantedToIdentitiesV2
For link type permissions, the details of the users to whom permission was granted. Note: Read-only.
Declaration
List<ISharePointIdentitySet> GrantedToIdentitiesV2 { get; }
Property Value
List<ISharePointIdentitySet>
|
GrantedToV2
For user type permissions, the details of the users and applications for this permission. Note: Read-only.
Declaration
ISharePointIdentitySet GrantedToV2 { get; }
Property Value
ISharePointIdentitySet
|
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.
Declaration
bool HasPassword { get; }
Property Value
System.Boolean
|
Id
The unique identifier of the permission among all permissions on the item. Note: Read-only.
Declaration
string Id { get; }
Property Value
System.String
|
Invitation
Details of any associated sharing invitation for this permission. Note: Read-only.
Declaration
ISharingInvitation Invitation { get; }
Property Value
ISharingInvitation
|
Link
Provides the link details of the current permission, if it is a link type permissions. Note: Read-only.
Declaration
ISharingLink Link { get; }
Property Value
ISharingLink
|
Roles
The type of permission
Declaration
List<PermissionRole> Roles { get; }
Property Value
List<PermissionRole>
|
ShareId
Methods
DeletePermission()
Delete a specific permission
Declaration
void DeletePermission()
DeletePermissionAsync()
Delete a specific permission
Declaration
Task DeletePermissionAsync()
Returns
Task
|
GrantUserPermissions(List<IDriveRecipient>)
Adds permissions for a set of users to a specific permission
Declaration
IGraphPermission GrantUserPermissions(List<IDriveRecipient> recipients)
Parameters
List<IDriveRecipient>
recipients
List of recipients to add |
Returns
IGraphPermission
|
GrantUserPermissionsAsync(List<IDriveRecipient>)
Adds permissions for a set of users to a specific permission
Declaration
Task<IGraphPermission> GrantUserPermissionsAsync(List<IDriveRecipient> recipients)
Parameters
List<IDriveRecipient>
recipients
List of recipients to add |
Returns
Task<IGraphPermission>
|
RemoveUserPermissions(List<IDriveRecipient>)
Removes permissions for a set of users from a specific permission
Declaration
IGraphPermission RemoveUserPermissions(List<IDriveRecipient> recipients)
Parameters
List<IDriveRecipient>
recipients
List of recipients to remove |
Returns
IGraphPermission
|
RemoveUserPermissionsAsync(List<IDriveRecipient>)
Removes permissions for a set of users from a specific permission
Declaration
Task<IGraphPermission> RemoveUserPermissionsAsync(List<IDriveRecipient> recipients)
Parameters
List<IDriveRecipient>
recipients
List of recipients to remove |
Returns
Task<IGraphPermission>
|