Class GraphUtility
Utility class to perform Graph operations.
Inheritance
Namespace: PnP.Framework.Graph
Assembly: PnP.Framework.dll
Syntax
public static class GraphUtility : object
Methods
CreateGraphClient(String, Int32, Int32, AzureEnvironment, Boolean)
Creates a new GraphServiceClient instance using a custom PnPHttpProvider
Declaration
public static GraphServiceClient CreateGraphClient(string accessToken, int retryCount = null, int delay = null, AzureEnvironment azureEnvironment = default(AzureEnvironment), bool useBetaEndPoint = false)
Parameters
System. The OAuth 2.0 Access Token to configure the HTTP bearer Authorization Header |
System. Number of times to retry the request in case of throttling |
System. Milliseconds to wait before retrying the request. |
Azure Defines the Azure Cloud deployment to use. |
System. Indicates if the v1.0 (false) or beta (true) endpoint should be used at Microsoft Graph |
Returns
Graph
|
InviteGuestUser(String, String, String, String, String, AzureEnvironment)
This method sends an Azure guest user invitation to the provided email address.
Declaration
public static Invitation InviteGuestUser(string accessToken, string guestUserEmail, string redirectUri, string customizedMessage = "", string guestUserDisplayName = "", AzureEnvironment azureEnvironment = default(AzureEnvironment))
Parameters
System. The OAuth 2.0 Access Token to use for invoking the Microsoft Graph |
System. Email of the user to whom the invite must be sent |
System. URL where the user will be redirected after the invite is accepted. |
System. Customized email message to be sent in the invitation email. |
System. Display name of the Guest user. |
Azure Defines the Azure Cloud Deployment. This is used to determine the MS Graph EndPoint to call which differs per Azure Cloud deployments. Defaults to Production (graph.microsoft.com). |
Returns
Invitation
|