Graph.Community.SPClient
5.1.0
dotnet add package Graph.Community.SPClient --version 5.1.0
NuGet\Install-Package Graph.Community.SPClient -Version 5.1.0
<PackageReference Include="Graph.Community.SPClient" Version="5.1.0" />
paket add Graph.Community.SPClient --version 5.1.0
#r "nuget: Graph.Community.SPClient, 5.1.0"
// Install Graph.Community.SPClient as a Cake Addin #addin nuget:?package=Graph.Community.SPClient&version=5.1.0 // Install Graph.Community.SPClient as a Cake Tool #tool nuget:?package=Graph.Community.SPClient&version=5.1.0
Graph SDK Community Extensions (Graph.Community)
The Graph extension library is a community effort to unblock developers building on .Net Standard who need to call endpoints that are not part of the Microsoft Graph.
Documentation
This community library contains requests and models that extend the Microsoft Graph SDK. Please review the Roadmap for an index of requests that are included and on the roadmap.
If there is an endpoint node for which you would like a request, please submit an issue to initiate a conversation. This will help reduce wasted effort.
Getting Started
The library includes a client factory class (CommunityGraphClientFactory
) that provides methods to setup the Graph Service client with the handlers included in this library.
Using TokenCredential class
To use a TokenCredential
class:
var credential = new DefaultAzureCredential();
CommunityGraphClientOptions clientOptions = new CommunityGraphClientOptions()
{
UserAgent = "ExtendedCapabilitiesSample"
};
var graphServiceClient = CommunityGraphClientFactory.Create(clientOptions, credential);
To use an Authorization provider:
IAuthenticationProvider ap = new CustomAuthenticationProvider(pca, scopes);
CommunityGraphClientOptions clientOptions = new CommunityGraphClientOptions()
{
UserAgent = "ExtendedCapabilitiesSample"
};
var graphServiceClient = CommunityGraphClientFactory.Create(clientOptions, ap);
A complete implementation is included in the Diagnostic sample.
The CommunityGraphClientOptions
provides for specifing information to decorate SharePoint REST traffic to help mitigate throttling.
Once a GraphServiceClient is instantiated, an extension method provides access to the SharePoint REST endpoint. This SharePointAPI
extension method requires an absolute URL to the SharePoint site collection that is the target of the call. Subsequent methods of the fluent API are used to address the feature area of the REST API.
Example
Statement:
gsc.SharePointAPI('https://mock.sharepoint.com/sites/mockSite')
.SiteDesigns
.Request()
.GetAsync()
Request:
GET https://mock.sharepoint.com/sites/mockSite/_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility.GetSiteDesigns`
SharePoint Handler
Starting with v3.21, the library contains middleware (a delegating handler) that will transform errors from SharePoint Online into a ServiceException. This allows consuming code to standardize error handling.
Breaking change in v3.18
The SPUser
class returned from the Web.SiteUsers
request has been renamed to User
. This aligns with the OData.type property returned from the service.
Versioning
The version number intentionaly aligned with the version of the Microsoft.Graph package.
Version Component | Notes |
---|---|
Major | Aligned with Microsoft.Graph |
Minor | Aligned with Microsoft.Graph |
Patch | Incremented as requests/models are added to Graph.Community |
Suffix | Release/build type |
Version suffixes (#
indicates a sequence number that is reset for each major/minor):
-CI-#
Continuous Integration release built from dev branch-preview#
Preview release, built from prerelease branch- No suffix is release build
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.1
- Microsoft.ApplicationInsights (>= 2.22.0)
- Microsoft.Kiota.Authentication.Azure (>= 1.1.4)
- Microsoft.Kiota.Http.HttpClientLibrary (>= 1.3.8)
- Microsoft.Kiota.Serialization.Form (>= 1.1.5)
- Microsoft.Kiota.Serialization.Json (>= 1.2.0)
- Microsoft.Kiota.Serialization.Multipart (>= 1.1.3)
- Microsoft.Kiota.Serialization.Text (>= 1.1.4)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
5.1.0 | 325 | 6/7/2024 |
5.0.1 | 198 | 4/24/2024 |
5.0.0 | 123 | 4/24/2024 |
5.0.0-beta4 | 112 | 4/24/2024 |
5.0.0-beta | 108 | 4/23/2024 |