Utility.GetAppLicenseDeploymentId method
Returns the deployment ID for the SharePoint deployment.
Namespace: Microsoft.SharePoint.Client.Utilities
Assembly: Microsoft.SharePoint.Client (in Microsoft.SharePoint.Client.dll)
Syntax
'Declaration
Public Shared Function GetAppLicenseDeploymentId ( _
context As ClientRuntimeContext _
) As ClientResult(Of Guid)
'Usage
Dim context As ClientRuntimeContext
Dim returnValue As ClientResult(Of Guid)
returnValue = Utility.GetAppLicenseDeploymentId(context)
public static ClientResult<Guid> GetAppLicenseDeploymentId(
ClientRuntimeContext context
)
Parameters
- context
Type: Microsoft.SharePoint.Client.ClientRuntimeContext
Return value
Type: Microsoft.SharePoint.Client.ClientResult<Guid>
The deployment ID for the specified SharePoint deployment.
Remarks
For apps for SharePoint, each app license applies to a specific app for a specific SharePoint deployment. In general, for the purpose of app licenses, deployment is defined as the SharePoint farm for on-premises SharePoint installations, and the tenancy for SharePoint Online in Office 365. Deployment scope can vary, however, based on the configuration of the on-premises SharePoint installation.
The deployment ID is a GUID generated by SharePoint and recorded by the Office Store the first time anyone from a specific SharePoint installation visits the Office Store site.
Never publish or transmit your deployment id to an unauthorized third party. For on-premises SharePoint installations, farm administrators can set the deployment ID via Windows PowerShell, for disaster recovery or test/production environment scenarios.
For more information on deployment IDs, and information about app licenses in general, see License your Office and SharePoint Add-ins.