Tenant.GetSiteByUrl method

Returns a site for the specified URL

Namespace:  Microsoft.Online.SharePoint.TenantAdministration
Assembly:  Microsoft.Online.SharePoint.Client.Tenant (in Microsoft.Online.SharePoint.Client.Tenant.dll)

Syntax

'Declaration
Public Overridable Function GetSiteByUrl ( _
    url As String _
) As Site
'Usage
Dim instance As Tenant
Dim url As String
Dim returnValue As Site

returnValue = instance.GetSiteByUrl(url)
public virtual Site GetSiteByUrl(
    string url
)

Parameters

  • url
    Type: System.String

    A string representing the URL of the site.

Return value

Type: Microsoft.SharePoint.Client.Site
Site

Remarks

This method throws an exception if the current user does not have access to the site.

See also

Reference

Tenant class

Tenant members

Microsoft.Online.SharePoint.TenantAdministration namespace