Interface IServicePrincipal
Manage the SharePoint apps service principal
Namespace: PnP.Core.Admin.Model.SharePoint
Assembly: PnP.Core.Admin.dll
Syntax
public interface IServicePrincipal
  
Manage the SharePoint apps service principal
public interface IServicePrincipal
  Grants a Permission
IPermissionGrant AddGrant(string resource, string scope, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        resource
         Resource of the permission  | 
    
| 
        System.String
        scope
         Scope of the permission  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IPermissionGrant
         the new permission grant  | 
    
Grants scope on a resource
IPermissionGrant2 AddGrant2(string resource, string scope, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        resource
         The name of the resource, e.g. Microsoft Graph  | 
    
| 
        System.String
        scope
         The scope to grant, e.g. 'User.ReadBasic.All'  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         
  | 
    
| 
        IPermissionGrant2
         The resulting IPermissionGrant2  | 
    
Grants scope on a resource
Task<IPermissionGrant2> AddGrant2Async(string resource, string scope, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        resource
         The name of the resource, e.g. Microsoft Graph  | 
    
| 
        System.String
        scope
         The scope to grant, e.g. 'User.ReadBasic.All'  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         
  | 
    
| 
        Task<IPermissionGrant2>
         The resulting IPermissionGrant2  | 
    
Grants a Permission
Task<IPermissionGrant> AddGrantAsync(string resource, string scope, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        resource
         Resource of the permission  | 
    
| 
        System.String
        scope
         Scope of the permission  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IPermissionGrant>
         the new permission grant  | 
    
Approves the specified permission request
IPermissionGrant ApprovePermissionRequest(string id, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        id
         permission request id  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IPermissionGrant
         permission grant  | 
    
Approves the specified permission request
Task<IPermissionGrant> ApprovePermissionRequestAsync(string id, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        id
         permission request id  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IPermissionGrant>
         permission grant  | 
    
Deletes the whole grant with all scopes.
void DeleteGrant2(string grantId, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        grantId
         The id of the grant  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         
  | 
    
Deletes the whole grant with all scopes.
Task DeleteGrant2Async(string grantId, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        grantId
         The id of the grant  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         
  | 
    
| 
        Task
         void  | 
    
Denies the specified permission request
void DenyPermissionRequest(string id, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        id
         permission request id  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
Denies the specified permission request
Task DenyPermissionRequestAsync(string id, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        id
         permission request id  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task
         
  | 
    
Disable the Service Principal
IServicePrincipalProperties Disable(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IServicePrincipalProperties
         the list of permission requests  | 
    
Disable the Service Principal
IServicePrincipalProperties Disable2(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IServicePrincipalProperties
         the list of permission requests  | 
    
Disable the Service Principal
Task<IServicePrincipalProperties> Disable2Async(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IServicePrincipalProperties>
         the list of permission requests  | 
    
Disable the Service Principal
Task<IServicePrincipalProperties> DisableAsync(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IServicePrincipalProperties>
         the list of permission requests  | 
    
Enable the Service Principal
IServicePrincipalProperties Enable(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IServicePrincipalProperties
         the list of permission requests  | 
    
Enable the Service Principal
IServicePrincipalProperties Enable2(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IServicePrincipalProperties
         the list of permission requests  | 
    
Enable the Service Principal
Task<IServicePrincipalProperties> Enable2Async(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IServicePrincipalProperties>
         the list of permission requests  | 
    
Enable the Service Principal
Task<IServicePrincipalProperties> EnableAsync(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IServicePrincipalProperties>
         the list of permission requests  | 
    
Lists pending permission requests
List<IPermissionRequest> GetPermissionRequests(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        List<IPermissionRequest>
         the list of permission requests  | 
    
Lists pending permission requests
Task<List<IPermissionRequest>> GetPermissionRequestsAsync(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<List<IPermissionRequest>>
         the list of permission requests  | 
    
Lists all granted Permissions
IEnumerable<IPermissionGrant> ListGrants(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IEnumerable<IPermissionGrant>
         the list of granted permissions  | 
    
Get all granted permissions of the SharePoint Online Client Extensibility Web Application Principal
IPermissionGrant2[] ListGrants2(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IPermissionGrant2[]
         The list of granted OAuth2 permissions  | 
    
Get all granted permissions of the SharePoint Online Client Extensibility Web Application Principal
Task<IPermissionGrant2[]> ListGrants2Async(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IPermissionGrant2[]>
         The list of granted OAuth2 permissions  | 
    
Lists all granted Permissions
Task<IEnumerable<IPermissionGrant>> ListGrantsAsync(VanityUrlOptions vanityUrlOptions = null)
  | 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IEnumerable<IPermissionGrant>>
         the list of granted permissions  | 
    
Revokes a Permission
IPermissionGrant RevokeGrant(string objectId, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        objectId
         Object Id of the permission  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        IPermissionGrant
         the revoked permission grant  | 
    
Removed a scope from an existing grant
IPermissionGrant2 RevokeGrant2(string grantId, string scope, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        grantId
         The id of the grant  | 
    
| 
        System.String
        scope
         The scope to remove from the grant denoted by grantId  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         
  | 
    
| 
        IPermissionGrant2
         The updated IPermissionGrant2, or null if the last scope was removed from the grant  | 
    
Removed a scope from an existing grant
Task<IPermissionGrant2> RevokeGrant2Async(string grantId, string scope, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        grantId
         The id of the grant  | 
    
| 
        System.String
        scope
         The scope to remove from the grant denoted by grantId  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         
  | 
    
| 
        Task<IPermissionGrant2>
         The updated IPermissionGrant2, or null if the last scope was removed from the grant  | 
    
Revokes a Permission
Task<IPermissionGrant> RevokeGrantAsync(string objectId, VanityUrlOptions vanityUrlOptions = null)
  | 
        System.String
        objectId
         Object Id of the permission  | 
    
| 
        VanityUrlOptions
        vanityUrlOptions
         Optionally specify the custom vanity URI's used by this tenant  | 
    
| 
        Task<IPermissionGrant>
         the revoked permission grant  |