Table of Contents

Interface IAppOperations

Namespace
PnP.Core.Admin.Model.SharePoint
Assembly
PnP.Core.Admin.dll

Interface for base app operations, like Deploy, Install, etc.

public interface IAppOperations

Methods

ApproveAsync(string)

Approves all permissions requested by the app.

Task<IPermissionGrant2[]> ApproveAsync(string aadPermissions)

Parameters

aadPermissions string

The requested AAD permissions, e.g.

Returns

Task<IPermissionGrant2[]>

Deploy(Guid, bool)

Deploys / trusts an app in the app catalog.

bool Deploy(Guid id, bool skipFeatureDeployment = true)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

skipFeatureDeployment bool

If set to true will skip the feature deployment for tenant scoped apps.

Returns

bool

true if deployment was successful.

DeployAsync(Guid, bool)

Deploys / trusts an app in the app catalog.

Task<bool> DeployAsync(Guid id, bool skipFeatureDeployment = true)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

skipFeatureDeployment bool

If set to true will skip the feature deployment for tenant scoped apps.

Returns

Task<bool>

true if deployment was successful.

Install(Guid)

Installs the app from the app catalog in a site.

bool Install(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

bool

true if installation was successful.

InstallAsync(Guid)

Installs the app from the app catalog in a site.

Task<bool> InstallAsync(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

Task<bool>

true if installation was successful.

Remove(Guid)

Removes the app from the app catalog.

bool Remove(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

bool

true if remove was successful.

RemoveAsync(Guid)

Removes the app from the app catalog.

Task<bool> RemoveAsync(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

Task<bool>

true if remove was successful.

Retract(Guid)

Retracts the app in the app catalog. Notice that this will not remove the app from the app catalog.

bool Retract(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

bool

true if retract was successful.

RetractAsync(Guid)

Retracts the app in the app catalog. Notice that this will not remove the app from the app catalog.

Task<bool> RetractAsync(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

Task<bool>

true if retract was successful.

Uninstall(Guid)

Uninstalls the app from a site.

bool Uninstall(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

bool

true if uninstall was successful.

UninstallAsync(Guid)

Uninstalls the app from a site.

Task<bool> UninstallAsync(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

Task<bool>

true if uninstall was successful.

Upgrade(Guid)

Upgrades the app in a site.

bool Upgrade(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

bool

true if upgrade was successful.

UpgradeAsync(Guid)

Upgrades the app in a site.

Task<bool> UpgradeAsync(Guid id)

Parameters

id Guid

The unique id of the app. Notice that this is not the product id as listed in the app catalog.

Returns

Task<bool>

true if upgrade was successful.