IGraphClient

IGraphClient class

Represents the interface for Graph REST client.

Methods

NameDescription
CopyFolderCopy a mailfolder and its contents to another mailfolder.
CopyMessageCopy a Message to another mailfolder.
CopyNotebookCopies a notebook to the Notebooks folder in the destination Documents library. The folder is created if it doesn’t exist. For Copy operations, you follow an asynchronous calling pattern: First call the Copy action, and then poll the operation endpoint for the result. Permissions One of the following permissions is required to call this API. Delegated(work or school account) Notes.Create, Notes.ReadWrite, Notes.ReadWrite.All Delegated(personal Microsoft account) Notes.Create, Notes.ReadWrite Application Notes.ReadWrite.All
CreateAttachmentCreates new attachment for specified item
CreateCalendarItemCreates MapiCalendar in specified calendar
CreateCategoryCreates an OutlookCategory object in the user’s master list of categories.
CreateContactCreates contact in specified folder
CreateFolder (2 overloads)Create new folder.
CreateMessage (2 overloads)Creates message in specified folder
CreateNotebookCreate a new OneNote notebook. Permissions One of the following permissions is required to call this API. Delegated (work or school account) Notes.Create, Notes.ReadWrite, Notes.ReadWrite.All Delegated (personal Microsoft account) Notes.Create, Notes.ReadWrite Application Notes.ReadWrite.All
CreateOrUpdateOverride (2 overloads)Create an override for a sender identified by an SMTP address. Future messages from that SMTP address will be consistently classified as specified in the override. Note:
CreateRuleCreate a message rule by specifying a set of conditions and actions. Outlook carries out those actions if an incoming message in the user’s Inbox meets the specified conditions. Permissions: One of the following permissions is required to call this API.To learn more, including how to choose permissions, see Permissions. Delegated (work or school account) MailboxSettings.ReadWrite Delegated (personal Microsoft account) MailboxSettings.ReadWrite Application MailboxSettings.ReadWrite
CreateTaskCreates Task in specified folder
CreateTaskListCreates new TaskList.
DeleteDelete object.
DeleteAttachmentRemoves attachment
DeleteTaskListDelete TaskList.
FetchAttachmentGets attachment for specified id
FetchCalendarItemGets MapiCalendar for specified id
FetchCategoryGet the properties and relationships of the specified outlookCategory object.
FetchContactGets MapiContact for specified id
FetchMessageGets message in specified id
FetchNotebookRetrieve the properties and relationships of a notebook object. Permissions One of the following permissions is required to call this API. Delegated (work or school account) Notes.Create, Notes.Read, Notes.ReadWrite, Notes.Read.All, Notes.ReadWrite.All Delegated (personal Microsoft account) Notes.Create, Notes.Read, Notes.ReadWrite Application Notes.Read.All, Notes.ReadWrite.All
FetchRuleGet the properties and relationships of a message rule object. Permissions One of the following permissions is required to call this API.To learn more, including how to choose permissions, see Permissions. Delegated (work or school account) MailboxSettings.Read Delegated (personal Microsoft account) MailboxSettings.Read Application MailboxSettings.Read
FetchTaskGets MapiTask for specified id
get_EndPointGets Microsoft Graph REST API endpoint. If not specified, the default is “https://graph.microsoft.com”.
get_MultipleServicesTokenProviderGets an object allows to retrieve OAuth access token.
get_ProxyGets data to proxy access to Exchange server.
get_ResourceGets resource type.
get_ResourceIdGets resource id. For instance for users it may be user principal name (UPN) or user id
get_TenantIdGets tenant identifier
get_TimeoutGets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).
get_TokenProviderGets an object allows to retrieve OAuth access token.
GetContactFolderGets main contact folder. This method requires that at least one contact exists in the main contacts folder, otherwise it will return null. https://learn.microsoft.com/en-us/answers/questions/854621/how-to-get-folder-id-of-default-contacts-folder-wh
GetFolderGets folder by an id.
GetOneNoteOperationStatusGet the status of a long-running OneNote operation. This applies to operations that return the Operation-Location header in the response, such as CopyNotebook, CopyToNotebook, CopyToSectionGroup, and CopyToSection. You can poll the Operation-Location endpoint until the status property returns completed or failed. If the status is completed, the resourceLocation property contains the resource endpoint URI. If the status is failed, the error and @api.diagnostics properties provide error information.
GetTaskListGets TaskList by an id.
ListAttachmentsList Attachments from the parent message.
ListCalendarItemsList MapiCalendar from the calendar.
ListCalendarsList CalendarInfo items.
ListCategoriesGet all the categories that have been defined for the user.
ListContactFoldersGet a collection of child folders under the root contact folder.
ListContactsList MapiContact from the parent folder.
ListFolders (2 overloads)List folders from the parent folder for folders that are displayed in normal mail clients, such as the inbox.
ListMessages (2 overloads)List MessageInfo from the parent folder.
ListNotebooksRetrieve a list of notebook objects. Permissions One of the following permissions is required to call this API. Delegated (work or school account) Notes.Create, Notes.Read, Notes.ReadWrite, Notes.Read.All, Notes.ReadWrite.All Delegated (personal Microsoft account) Notes.Create, Notes.Read, Notes.ReadWrite Application Notes.Read.All, Notes.ReadWrite.All
ListOverridesGet the overrides that a user has set up to always classify messages from certain senders in specific ways. Each override corresponds to an SMTP address of a sender.Initially, a user does not have any overrides. Permissions: One of the following permissions is required to call this API.To learn more, including how to choose permissions, see Permissions. Delegated (work or school account) Mail.Read Delegated (personal Microsoft account) Mail.Read Application Mail.Read
ListRulesGet all the messageRule objects defined for the user’s Inbox. Permissions One of the following permissions is required to call this API.To learn more, including how to choose permissions, see Permissions. Delegated (work or school account) MailboxSettings.Read Delegated (personal Microsoft account) MailboxSettings.Read Application MailboxSettings.Read
ListTaskListsList TaskList items.
ListTasksList MapiTask from the parent TaskList.
MoveFolderMove a mailfolder and its contents to another mailfolder.
MoveMessageMove a message to another mailfolder.
Send (4 overloads)Sends email message
SendAsMimeSends email message using MIME format
set_EndPointSets Microsoft Graph REST API endpoint. If not specified, the default is “https://graph.microsoft.com”.
set_MultipleServicesTokenProviderSets an object allows to retrieve OAuth access token.
set_ProxySets data to proxy access to Exchange server.
set_ResourceSets resource type.
set_ResourceIdSets resource id. For instance for users it may be user principal name (UPN) or user id
set_TenantIdSets tenant identifier
set_TimeoutSets the number of milliseconds to wait before the operation times out. The default value is 100,000 milliseconds (100 seconds).
set_TokenProviderSets an object allows to retrieve OAuth access token.
SetReadMark message as read
UpdateCalendarItem (2 overloads)Updates MapiCalendar
UpdateCategoryUpdates pre-set color constant for specified category
UpdateContactUpdates contact
UpdateFolderUpdates folder.
UpdateMessage (4 overloads)Updates message
UpdateOverrideChange the classifyAs field of an override as specified. You cannot use this method to change any other fields in an ClassificationOverride instance. If an override exists for a sender and the sender changes his/her display name, you can use CreateOrUpdateOverride to force an update to the name field in the existing override. If an override exists for a sender and the sender changes his/her SMTP address, deleting the existing override and creating a new one with the new SMTP address is the only way to “update” the override for this sender. Permissions: One of the following permissions is required to call this API.To learn more, including how to choose permissions, see Permissions. Delegated (work or school account) Mail.ReadWrite Delegated (personal Microsoft account) Mail.ReadWrite Application Mail.ReadWrite
UpdateRuleChange writable properties on a messageRule object and save the changes. Permissions One of the following permissions is required to call this API.To learn more, including how to choose permissions, see Permissions. Delegated (work or school account) MailboxSettings.ReadWrite Delegated (personal Microsoft account) MailboxSettings.ReadWrite Application MailboxSettings.ReadWrite
UpdateTask (2 overloads)Updates Task
UpdateTaskListUpdates TaskList.