返回给定的 SharePoint 部署中的 SharePoint 分配给当前用户指定的应用程序的所有应用程序许可证的集合。
命名空间: Microsoft.SharePoint.Utilities
程序集: Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)
语法
声明
Public Shared Function GetAppLicenseInformation ( _
productId As Guid _
) As SPAppLicenseCollection
用法
Dim productId As Guid
Dim returnValue As SPAppLicenseCollection
returnValue = SPUtility.GetAppLicenseInformation(productId)
public static SPAppLicenseCollection GetAppLicenseInformation(
Guid productId
)
参数
productId
类型:System.Guid应用程序的产品 ID。
返回值
类型:Microsoft.SharePoint.SPAppLicenseCollection
为 SharePoint 分配给当前用户指定的应用程序的所有应用程序许可证的集合。
备注
用户可以拥有多个应用程序许可证分配给它们的给定的 SharePoint 部署中相同的应用程序。
如果为同一应用程序购买了多个许可证,使用不同的 Microsoft 帐户,返回这些许可证的优先级顺序如下:
付费
免费
未过期试用版
过期试用版
GetAppLicenseInformation方法不会返回许可证已到期或保留标记。保留的标记是其不能由 SharePoint ; 自动续订许可证令牌为了保持有效,必须手动通过登录到 Office 商店购买者地续订保留的标记。
应用程序清单中,可以找到应用程序的产品 ID。
For more information about app licenses, see 许可 Office 和 SharePoint 应用程序.