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
[Obsolete("Use AddGrant2 instead")]
IPermissionGrant AddGrant(string resource, string scope, VanityUrlOptions vanityUrlOptions = null)
|
string
resource
Resource of the permission |
|
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)
|
string
resource
The name of the resource, e.g. Microsoft Graph |
|
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)
|
string
resource
The name of the resource, e.g. Microsoft Graph |
|
string
scope
The scope to grant, e.g. 'User.ReadBasic.All' |
| VanityUrlOptions vanityUrlOptions |
|
Task<IPermissionGrant2>
The resulting IPermissionGrant2 |
Grants a Permission
[Obsolete("Use AddGrant2Async instead")]
Task<IPermissionGrant> AddGrantAsync(string resource, string scope, VanityUrlOptions vanityUrlOptions = null)
|
string
resource
Resource of the permission |
|
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
[Obsolete("Use IApp.ApprovePermissionRequests instead")]
IPermissionGrant ApprovePermissionRequest(string id, VanityUrlOptions vanityUrlOptions = null)
|
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
[Obsolete("Use IApp.ApprovePermissionRequestsAsync instead")]
Task<IPermissionGrant> ApprovePermissionRequestAsync(string id, VanityUrlOptions vanityUrlOptions = null)
|
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)
|
string
grantId
The id of the grant |
| VanityUrlOptions vanityUrlOptions |
Deletes the whole grant with all scopes.
Task DeleteGrant2Async(string grantId, VanityUrlOptions vanityUrlOptions = null)
|
string
grantId
The id of the grant |
| VanityUrlOptions vanityUrlOptions |
|
Task
void |
Denies the specified permission request
[Obsolete("Use RevokeGrant2 instead")]
void DenyPermissionRequest(string id, VanityUrlOptions vanityUrlOptions = null)
|
string
id
permission request id |
|
VanityUrlOptions
vanityUrlOptions
Optionally specify the custom vanity URI's used by this tenant |
Denies the specified permission request
[Obsolete("Use RevokeGrant2Async instead")]
Task DenyPermissionRequestAsync(string id, VanityUrlOptions vanityUrlOptions = null)
|
string
id
permission request id |
|
VanityUrlOptions
vanityUrlOptions
Optionally specify the custom vanity URI's used by this tenant |
| Task |
Disable the Service Principal
[Obsolete("Use Disable2 instead")]
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
[Obsolete("Use Disable2Async instead")]
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
[Obsolete("Use Enable2 instead")]
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
[Obsolete("Use Enable2Async instead")]
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
[Obsolete("Use ListGrants2 instead")]
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
[Obsolete("Use ListGrants2Async instead")]
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
[Obsolete("Use ListGrants2 instead")]
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
[Obsolete("Use ListGrants2Async instead")]
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
[Obsolete("Use RevokeGrant2 instead")]
IPermissionGrant RevokeGrant(string objectId, VanityUrlOptions vanityUrlOptions = null)
|
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)
|
string
grantId
The id of the grant |
|
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)
|
string
grantId
The id of the grant |
|
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
[Obsolete("Use RevokeGrant2Async instead")]
Task<IPermissionGrant> RevokeGrantAsync(string objectId, VanityUrlOptions vanityUrlOptions = null)
|
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 |