Table of Contents

Interface IApp

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

Represents a base interface for an app stored either in tenant or site collection app catalog.

public interface IApp : IDataModelWithContext
Inherited Members

Properties

AadAppId

Azure Active Directory Id of the SharePoint Online Client Extensibility Web Application Principal. It's not empty if your SPFx solution requests any AAD permissions.

string AadAppId { get; set; }

Property Value

string

AadPermissions

The list of Azure Active Directory permissions your SPFx solution requests.

string AadPermissions { get; set; }

Property Value

string

AppCatalogVersion

Returns version of the app in the app catalog.

[JsonConverter(typeof(VersionConverter))]
Version AppCatalogVersion { get; set; }

Property Value

Version

CDNLocation

Returns the url of CDN if your app is hosted on CDN. If it's hosted inside SharePoint, it returns "SharePoint Online".

string CDNLocation { get; set; }

Property Value

string

CanUpgrade

Returns whether an existing instance of the app can be upgraded. True if there's newer version available in the app catalog compared to the instance in the site.

bool CanUpgrade { get; set; }

Property Value

bool

ContainsTenantWideExtension

Indicates whether your app contains tenant wide extensions.

bool ContainsTenantWideExtension { get; set; }

Property Value

bool

CurrentVersionDeployed

Indicates whether the current version of the app is deployed.

bool CurrentVersionDeployed { get; set; }

Property Value

bool

Deployed

Indicates whether the app has been deployed to the context site. True if particular app has been installed to the site.

bool Deployed { get; set; }

Property Value

bool

ErrorMessage

Contains an error message if the app contains any problems during deployment.

string ErrorMessage { get; set; }

Property Value

string

Id

Unique ID of the library list item of the app.

Guid Id { get; set; }

Property Value

Guid

InstalledVersion

Returns a version of the installed app in the site context.

[JsonConverter(typeof(VersionConverter))]
Version InstalledVersion { get; set; }

Property Value

Version

IsClientSideSolution

Indicates whether the app is SharePoint Framework client-side solution.

bool IsClientSideSolution { get; set; }

Property Value

bool

IsEnabled

Whether the app is enabled.

bool IsEnabled { get; set; }

Property Value

bool

IsPackageDefaultSkipFeatureDeployment

Returns true, if the app's config (./config/package-solution.json) contains "skipFeatureDeployment" setting and it's set to true.

bool IsPackageDefaultSkipFeatureDeployment { get; set; }

Property Value

bool

IsValidAppPackage

Indicates whether the app package is valid.

bool IsValidAppPackage { get; set; }

Property Value

bool

ProductId

The app's product id.

Guid ProductId { get; set; }

Property Value

Guid

ShortDescription

The short description of the app.

string ShortDescription { get; set; }

Property Value

string

SkipDeploymentFeature

Returns true, if the app was globally deployed.

bool SkipDeploymentFeature { get; set; }

Property Value

bool

ThumbnailUrl

The thumbnail url of the app.

string ThumbnailUrl { get; set; }

Property Value

string

Title

Title of the app.

string Title { get; set; }

Property Value

string

Methods

ApprovePermissionRequests()

Approves All PermissionRequests

IPermissionGrant2[] ApprovePermissionRequests()

Returns

IPermissionGrant2[]

true if all permissions have been approved successfully.

ApprovePermissionRequestsAsync()

Approves All PermissionRequests

Task<IPermissionGrant2[]> ApprovePermissionRequestsAsync()

Returns

Task<IPermissionGrant2[]>

Deploy(bool)

Deploys / trusts an app in the app catalog.

bool Deploy(bool skipFeatureDeployment = true)

Parameters

skipFeatureDeployment bool

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

Returns

bool

true if deployment was successful.

DeployAsync(bool)

Deploys / trusts an app in the app catalog.

Task<bool> DeployAsync(bool skipFeatureDeployment = true)

Parameters

skipFeatureDeployment bool

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

Returns

Task<bool>

true if deployment was successful.

Install()

Installs the app from the app catalog in a site.

bool Install()

Returns

bool

true if installation was successful.

InstallAsync()

Installs the app from the app catalog in a site.

Task<bool> InstallAsync()

Returns

Task<bool>

true if installation was successful.

Remove()

Removes the app from the app catalog.

bool Remove()

Returns

bool

true if remove was successful.

RemoveAsync()

Removes the app from the app catalog.

Task<bool> RemoveAsync()

Returns

Task<bool>

true if remove was successful.

Retract()

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

bool Retract()

Returns

bool

true if retract was successful.

RetractAsync()

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

Task<bool> RetractAsync()

Returns

Task<bool>

true if retract was successful.

Uninstall()

Uninstalls the app from a site.

bool Uninstall()

Returns

bool

true if uninstall was successful.

UninstallAsync()

Uninstalls the app from a site.

Task<bool> UninstallAsync()

Returns

Task<bool>

true if uninstall was successful.

Upgrade()

Upgrades the app in a site.

bool Upgrade()

Returns

bool

true if upgrade was successful.

UpgradeAsync()

Upgrades the app in a site.

Task<bool> UpgradeAsync()

Returns

Task<bool>

true if upgrade was successful.