Table of Contents

Interface IAppManager<T>

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

App Admin features

public interface IAppManager<T> : IAppOperations where T : IApp

Type Parameters

T
Inherited Members

Properties

ServicePrincipal

Get the SharePoint Apps Service Principal enabling you to approve/reject permissions requests

IServicePrincipal ServicePrincipal { get; }

Property Value

IServicePrincipal

Methods

Add(byte[], string, bool)

Uploads a file to the app catalog.

T Add(byte[] file, string fileName, bool overwrite = false)

Parameters

file byte[]

A byte array containing the file.

fileName string

The filename (e.g. myapp.sppkg) of the file to upload.

overwrite bool

If true will overwrite an existing entry.

Returns

T

An instance of the app.

Add(string, bool)

Uploads an app file to the app catalog.

T Add(string path, bool overwrite = false)

Parameters

path string
overwrite bool

If true will overwrite an existing entry.

Returns

T

An instance of the app.

AddAsync(byte[], string, bool)

Uploads a file to the app catalog.

Task<T> AddAsync(byte[] file, string fileName, bool overwrite = false)

Parameters

file byte[]

A byte array containing the file.

fileName string

The filename (e.g. myapp.sppkg) of the file to upload.

overwrite bool

If true will overwrite an existing entry.

Returns

Task<T>

An instance of the app.

AddAsync(string, bool)

Uploads an app file to the app catalog.

Task<T> AddAsync(string path, bool overwrite = false)

Parameters

path string
overwrite bool

If true will overwrite an existing entry.

Returns

Task<T>

An instance of the app.

GetAvailable()

Gets all available apps from the app catalog.

IList<T> GetAvailable()

Returns

IList<T>

A collection of apps.

GetAvailable(Guid)

Gets available app by it's unique id.

T GetAvailable(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

T

An instance of the app.

GetAvailable(string)

Gets available app by it's title.

T GetAvailable(string title)

Parameters

title string

An app's title.

Returns

T

An instance of the app.

GetAvailableAsync()

Gets all available apps from the app catalog.

Task<IList<T>> GetAvailableAsync()

Returns

Task<IList<T>>

A collection of apps.

GetAvailableAsync(Guid)

Gets available app by it's unique id.

Task<T> GetAvailableAsync(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<T>

An instance of the app.

GetAvailableAsync(string)

Gets available app by it's title.

Task<T> GetAvailableAsync(string title)

Parameters

title string

An app's title.

Returns

Task<T>

An instance of the app.