{"componentChunkName":"component---src-templates-post-js","path":"/blog/2024/04/18/graph-sdk-v5/","result":{"data":{"post":{"html":"<p>Have you ever wanted to do something within the context of Microsoft products and wondered how can I do it via APIs or programmatically? I have been in far too many situations where performing a simple task like forwarding multiple calendar events to my colleague which can’t be done via the Outlook UI has bothered me, hence leveraging the power of <a href=\"https://learn.microsoft.com/en-us/graph/overview\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Microsoft Graph APIs</a> heavily in even in my day to day tasks.</p>\n<!--more-->\n<h2 id=\"context\" style=\"position:relative;\"><a href=\"#context\" aria-label=\"context permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Context</h2>\n<p>As I mentioned earlier, the challenge was brought up when I decided to forward 20 odd events in my calendar to my colleague and thought why do it manually?</p>\n<h2 id=\"setup\" style=\"position:relative;\"><a href=\"#setup\" aria-label=\"setup permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup</h2>\n<p>I quickly started VS Code and created a new DotNet console application and added the Graph SDK packages I needed which I knew of:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"70459192167871730000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`dotnet new console -n ForwardEmails\r\n\r\ncd ForwardEmails\r\n\r\ndotnet add package Microsoft.Graph\r\ndotnet add package Azure.Identity`, `70459192167871730000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-bash line-numbers\"><code class=\"language-bash\">dotnet new console <span class=\"token parameter variable\">-n</span> ForwardEmails\r\n\r\n<span class=\"token builtin class-name\">cd</span> ForwardEmails\r\n\r\ndotnet <span class=\"token function\">add</span> package Microsoft.Graph\r\ndotnet <span class=\"token function\">add</span> package Azure.Identity</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"creating-the-client\" style=\"position:relative;\"><a href=\"#creating-the-client\" aria-label=\"creating the client permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Creating the client</h2>\n<p>Next was to create a client and call the APIs to get the events I wanted, but before I do that, I had to make sure I have an <a href=\"https://learn.microsoft.com/en-us/graph/auth-register-app-v2\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">app registration created with the required permissions on Microsoft Graph APIs</a>.</p>\n<p>But that was when I found out my old code is not working anymore because the <code class=\"language-text\">DelegateAuthenticationProvider</code> is no more. The SDK has moved to <a href=\"https://github.com/microsoft/kiota\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Kiota’s</a> <code class=\"language-text\">IAccessTokenProvider</code> which one can use to create a custom token provider and use it to instantiate the client. Of course I only have this problem because I am not allowed to use an app registration on the Microsoft tenant, but I would assume many organisations might implement similar precautions in place. For information on ready to use providers you can check out the <a href=\"https://learn.microsoft.com/en-us/graph/sdks/choose-authentication-providers?tabs=csharp\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">documentation here</a>.</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"37836553106484490000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`public class TokenProvider : IAccessTokenProvider\r\n{\r\n    public Task<string> GetAuthorizationTokenAsync(Uri uri, Dictionary<string, object> additionalAuthenticationContext = default,\r\n        CancellationToken cancellationToken = default)\r\n    {\r\n        var token = &quot;token&quot;;\r\n        // get the token and return it in your own way\r\n        return Task.FromResult(token);\r\n    }\r\n\r\n    public AllowedHostsValidator AllowedHostsValidator { get; }\r\n}`, `37836553106484490000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token keyword\">public</span> <span class=\"token keyword\">class</span> <span class=\"token class-name\">TokenProvider</span> <span class=\"token punctuation\">:</span> <span class=\"token type-list\"><span class=\"token class-name\">IAccessTokenProvider</span></span>\r\n<span class=\"token punctuation\">{</span>\r\n    <span class=\"token keyword\">public</span> <span class=\"token return-type class-name\">Task<span class=\"token punctuation\">&lt;</span><span class=\"token keyword\">string</span><span class=\"token punctuation\">></span></span> <span class=\"token function\">GetAuthorizationTokenAsync</span><span class=\"token punctuation\">(</span><span class=\"token class-name\">Uri</span> uri<span class=\"token punctuation\">,</span> <span class=\"token class-name\">Dictionary<span class=\"token punctuation\">&lt;</span><span class=\"token keyword\">string</span><span class=\"token punctuation\">,</span> <span class=\"token keyword\">object</span><span class=\"token punctuation\">></span></span> additionalAuthenticationContext <span class=\"token operator\">=</span> <span class=\"token keyword\">default</span><span class=\"token punctuation\">,</span>\r\n        <span class=\"token class-name\">CancellationToken</span> cancellationToken <span class=\"token operator\">=</span> <span class=\"token keyword\">default</span><span class=\"token punctuation\">)</span>\r\n    <span class=\"token punctuation\">{</span>\r\n        <span class=\"token class-name\"><span class=\"token keyword\">var</span></span> token <span class=\"token operator\">=</span> <span class=\"token string\">\"token\"</span><span class=\"token punctuation\">;</span>\r\n        <span class=\"token comment\">// get the token and return it in your own way</span>\r\n        <span class=\"token keyword\">return</span> Task<span class=\"token punctuation\">.</span><span class=\"token function\">FromResult</span><span class=\"token punctuation\">(</span>token<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n    <span class=\"token punctuation\">}</span>\r\n\r\n    <span class=\"token keyword\">public</span> <span class=\"token return-type class-name\">AllowedHostsValidator</span> AllowedHostsValidator <span class=\"token punctuation\">{</span> <span class=\"token keyword\">get</span><span class=\"token punctuation\">;</span> <span class=\"token punctuation\">}</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Now I could use that provider to instantiate the client:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"22284697633704886000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var authenticationProvider = new BaseBearerTokenAuthenticationProvider(new TokenProvider());\r\nvar graphServiceClient = new GraphServiceClient(authenticationProvider);`, `22284697633704886000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token class-name\"><span class=\"token keyword\">var</span></span> authenticationProvider <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token constructor-invocation class-name\">BaseBearerTokenAuthenticationProvider</span><span class=\"token punctuation\">(</span><span class=\"token keyword\">new</span> <span class=\"token constructor-invocation class-name\">TokenProvider</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> graphServiceClient <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token constructor-invocation class-name\">GraphServiceClient</span><span class=\"token punctuation\">(</span>authenticationProvider<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span></span></pre></div>\n<h2 id=\"removal-of-the-code-classlanguage-textrequestcode-method\" style=\"position:relative;\"><a href=\"#removal-of-the-code-classlanguage-textrequestcode-method\" aria-label=\"removal of the code classlanguage textrequestcode method permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Removal of the <code class=\"language-text\">request</code> method</h2>\n<p>Graph SDK uses the fluent API pattern to construct the request for different objects within Graph APIs. However, they have now removed the <code class=\"language-text\">request()</code> method and instead use regular methods like <code class=\"language-text\">GetAsync</code> and <code class=\"language-text\">PostAsync</code> which get parameters to customise the request information based on the <code class=\"language-text\">RequestInformation</code> class instead of the <code class=\"language-text\">IBaseRequest</code>.</p>\n<p>As an example:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"52589534197216440000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var user = await graphServiceClient\r\n  .Me\r\n  .Request()  // this is removed\r\n  .GetAsync();`, `52589534197216440000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token class-name\"><span class=\"token keyword\">var</span></span> user <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> graphServiceClient\r\n  <span class=\"token punctuation\">.</span>Me\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">Request</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>  <span class=\"token comment\">// this is removed</span>\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">GetAsync</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Is simplified to:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"97818771273831190000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var user = await graphServiceClient\r\n  .Me\r\n  .GetAsync();`, `97818771273831190000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token class-name\"><span class=\"token keyword\">var</span></span> user <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> graphServiceClient\r\n  <span class=\"token punctuation\">.</span>Me\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">GetAsync</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"adding-header-and-url-parameters\" style=\"position:relative;\"><a href=\"#adding-header-and-url-parameters\" aria-label=\"adding header and url parameters permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Adding header and url parameters</h2>\n<p>The next change that I found out about was the way we now have to pass in the header and URL parameters. Previously we used to use specific methods like <code class=\"language-text\">Header</code>, <code class=\"language-text\">Filter</code> and <code class=\"language-text\">Select</code> to add these:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"95694762849810270000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var groups = await graphServiceClient\r\n  .Me\r\n  .TransitiveMemberOf\r\n  .Request()\r\n  .Header(&quot;ConsistencyLevel&quot;, &quot;eventual&quot;)\r\n  .Filter(\\$&quot;id eq '{groupId}'&\\$count=true&quot;) // This combines the \\$filter and \\$count\r\n  .Select(&quot;id&quot;)\r\n  .GetAsync();`, `95694762849810270000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token class-name\"><span class=\"token keyword\">var</span></span> groups <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> graphServiceClient\r\n  <span class=\"token punctuation\">.</span>Me\r\n  <span class=\"token punctuation\">.</span>TransitiveMemberOf\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">Request</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">Header</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"ConsistencyLevel\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"eventual\"</span><span class=\"token punctuation\">)</span>\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">Filter</span><span class=\"token punctuation\">(</span><span class=\"token interpolation-string\"><span class=\"token string\">$\"id eq '</span><span class=\"token interpolation\"><span class=\"token punctuation\">{</span><span class=\"token expression language-csharp\">groupId</span><span class=\"token punctuation\">}</span></span><span class=\"token string\">'&amp;$count=true\"</span></span><span class=\"token punctuation\">)</span> <span class=\"token comment\">// This combines the $filter and $count</span>\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">Select</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"id\"</span><span class=\"token punctuation\">)</span>\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">GetAsync</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>With the new version we have to pass these as a parameter to the method itself:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"25482467546715128000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var groups = await graphServiceClient\r\n  .Me\r\n  .TransitiveMemberOf\r\n  .GraphGroup\r\n  .GetAsync((requestConfiguration) =>\r\n  {\r\n    requestConfiguration.QueryParameters.Select = [&quot;id&quot;];\r\n    requestConfiguration.QueryParameters.Filter = \\$&quot;id eq '{groupId}'&quot;;\r\n    requestConfiguration.QueryParameters.Count = true;\r\n    requestConfiguration.Headers.Add(&quot;ConsistencyLevel&quot;, &quot;eventual&quot;);\r\n  });`, `25482467546715128000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token class-name\"><span class=\"token keyword\">var</span></span> groups <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> graphServiceClient\r\n  <span class=\"token punctuation\">.</span>Me\r\n  <span class=\"token punctuation\">.</span>TransitiveMemberOf\r\n  <span class=\"token punctuation\">.</span>GraphGroup\r\n  <span class=\"token punctuation\">.</span><span class=\"token function\">GetAsync</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">(</span>requestConfiguration<span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span>\r\n  <span class=\"token punctuation\">{</span>\r\n    requestConfiguration<span class=\"token punctuation\">.</span>QueryParameters<span class=\"token punctuation\">.</span>Select <span class=\"token operator\">=</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"id\"</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">;</span>\r\n    requestConfiguration<span class=\"token punctuation\">.</span>QueryParameters<span class=\"token punctuation\">.</span>Filter <span class=\"token operator\">=</span> <span class=\"token interpolation-string\"><span class=\"token string\">$\"id eq '</span><span class=\"token interpolation\"><span class=\"token punctuation\">{</span><span class=\"token expression language-csharp\">groupId</span><span class=\"token punctuation\">}</span></span><span class=\"token string\">'\"</span></span><span class=\"token punctuation\">;</span>\r\n    requestConfiguration<span class=\"token punctuation\">.</span>QueryParameters<span class=\"token punctuation\">.</span>Count <span class=\"token operator\">=</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">;</span>\r\n    requestConfiguration<span class=\"token punctuation\">.</span>Headers<span class=\"token punctuation\">.</span><span class=\"token function\">Add</span><span class=\"token punctuation\">(</span><span class=\"token string\">\"ConsistencyLevel\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"eventual\"</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"handing-the-response\" style=\"position:relative;\"><a href=\"#handing-the-response\" aria-label=\"handing the response permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Handing the response</h2>\n<p>From the response perspective, we can get single objects, a collection of objects or even a page iterator. For single it’s very straightforward, for collections we could use the models within the <code class=\"language-text\">Microsoft.Graph.Models</code> namespace:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"52159001689872105000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var usersResponse = await graphServiceClient\r\n    .Users\r\n    .GetAsync(requestConfiguration => requestConfiguration.QueryParameters.Select = new string[] { &quot;id&quot;, &quot;createdDateTime&quot;});\r\n\r\nList<User> userList = usersResponse.Value;`, `52159001689872105000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token class-name\"><span class=\"token keyword\">var</span></span> usersResponse <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> graphServiceClient\r\n    <span class=\"token punctuation\">.</span>Users\r\n    <span class=\"token punctuation\">.</span><span class=\"token function\">GetAsync</span><span class=\"token punctuation\">(</span>requestConfiguration <span class=\"token operator\">=></span> requestConfiguration<span class=\"token punctuation\">.</span>QueryParameters<span class=\"token punctuation\">.</span>Select <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token constructor-invocation class-name\"><span class=\"token keyword\">string</span><span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span></span> <span class=\"token punctuation\">{</span> <span class=\"token string\">\"id\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"createdDateTime\"</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token class-name\">List<span class=\"token punctuation\">&lt;</span>User<span class=\"token punctuation\">></span></span> userList <span class=\"token operator\">=</span> usersResponse<span class=\"token punctuation\">.</span>Value<span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>When the items are too many and the results are returned in pages, you can now leverage a page iterator which you can pass in a callback function in for your logic:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"53550628464346130000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`var usersResponse = await graphServiceClient\r\n    .Users\r\n    .GetAsync(requestConfiguration => { \r\n        requestConfiguration.QueryParameters.Select = new string[] { &quot;id&quot;, &quot;createdDateTime&quot; }; \r\n        requestConfiguration.QueryParameters.Top = 5; \r\n        });\r\n\r\nvar userList = new List<User>();\r\nvar pageIterator = PageIterator<User,UserCollectionResponse>.CreatePageIterator(graphServiceClient,usersResponse, (user) => { userList.Add(user); return true; });\r\n\r\nawait pageIterator.IterateAsync();`, `53550628464346130000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token class-name\"><span class=\"token keyword\">var</span></span> usersResponse <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> graphServiceClient\r\n    <span class=\"token punctuation\">.</span>Users\r\n    <span class=\"token punctuation\">.</span><span class=\"token function\">GetAsync</span><span class=\"token punctuation\">(</span>requestConfiguration <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span> \r\n        requestConfiguration<span class=\"token punctuation\">.</span>QueryParameters<span class=\"token punctuation\">.</span>Select <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token constructor-invocation class-name\"><span class=\"token keyword\">string</span><span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span></span> <span class=\"token punctuation\">{</span> <span class=\"token string\">\"id\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"createdDateTime\"</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">;</span> \r\n        requestConfiguration<span class=\"token punctuation\">.</span>QueryParameters<span class=\"token punctuation\">.</span>Top <span class=\"token operator\">=</span> <span class=\"token number\">5</span><span class=\"token punctuation\">;</span> \r\n        <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> userList <span class=\"token operator\">=</span> <span class=\"token keyword\">new</span> <span class=\"token constructor-invocation class-name\">List<span class=\"token punctuation\">&lt;</span>User<span class=\"token punctuation\">></span></span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> pageIterator <span class=\"token operator\">=</span> PageIterator<span class=\"token operator\">&lt;</span>User<span class=\"token punctuation\">,</span>UserCollectionResponse<span class=\"token operator\">></span><span class=\"token punctuation\">.</span><span class=\"token function\">CreatePageIterator</span><span class=\"token punctuation\">(</span>graphServiceClient<span class=\"token punctuation\">,</span>usersResponse<span class=\"token punctuation\">,</span> <span class=\"token punctuation\">(</span>user<span class=\"token punctuation\">)</span> <span class=\"token operator\">=></span> <span class=\"token punctuation\">{</span> userList<span class=\"token punctuation\">.</span><span class=\"token function\">Add</span><span class=\"token punctuation\">(</span>user<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span> <span class=\"token keyword\">return</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">;</span> <span class=\"token punctuation\">}</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token keyword\">await</span> pageIterator<span class=\"token punctuation\">.</span><span class=\"token function\">IterateAsync</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"error-handling\" style=\"position:relative;\"><a href=\"#error-handling\" aria-label=\"error handling permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Error handling</h2>\n<p>All errors and exceptions are now use the exception classes derived from the <code class=\"language-text\">APIException</code> class from the Kiota abstractions which typically is an instance of the <code class=\"language-text\">OdataError</code>:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"99215971745109800000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`try\r\n{\r\n    await graphServiceClient.Me.DeleteAsync(user);\r\n}\r\ncatch (ODataError odataError)\r\n{\r\n    Console.WriteLine(odataError.Error.Code);\r\n    Console.WriteLine(odataError.Error.Message);\r\n    throw;\r\n}`, `99215971745109800000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token keyword\">try</span>\r\n<span class=\"token punctuation\">{</span>\r\n    <span class=\"token keyword\">await</span> graphServiceClient<span class=\"token punctuation\">.</span>Me<span class=\"token punctuation\">.</span><span class=\"token function\">DeleteAsync</span><span class=\"token punctuation\">(</span>user<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n<span class=\"token punctuation\">}</span>\r\n<span class=\"token keyword\">catch</span> <span class=\"token punctuation\">(</span><span class=\"token class-name\">ODataError</span> odataError<span class=\"token punctuation\">)</span>\r\n<span class=\"token punctuation\">{</span>\r\n    Console<span class=\"token punctuation\">.</span><span class=\"token function\">WriteLine</span><span class=\"token punctuation\">(</span>odataError<span class=\"token punctuation\">.</span>Error<span class=\"token punctuation\">.</span>Code<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n    Console<span class=\"token punctuation\">.</span><span class=\"token function\">WriteLine</span><span class=\"token punctuation\">(</span>odataError<span class=\"token punctuation\">.</span>Error<span class=\"token punctuation\">.</span>Message<span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n    <span class=\"token keyword\">throw</span><span class=\"token punctuation\">;</span>\r\n<span class=\"token punctuation\">}</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<h2 id=\"other-cool-features\" style=\"position:relative;\"><a href=\"#other-cool-features\" aria-label=\"other cool features permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Other cool features</h2>\n<p>And there are other cool features like using parameter objects when calling <code class=\"language-text\">Odata</code> functions or actions, batching requests, supporting <code class=\"language-text\">$count</code> in request builders, and so on you could find in the <a href=\"https://github.com/microsoftgraph/msgraph-sdk-dotnet/blob/dev/docs/upgrade-to-v5.md\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">change logs</a>, however, the coolest one to me was the backing store which is a new feature.</p>\n<p>This allows you to get an object, update it and when you wanted to send the data back only the changes are sent back and not the whole object which is also known as dirty tracking:</p>\n<div\n              class=\"gatsby-code-button-container\"\n              data-toaster-id=\"84137483106440270000\"\n              data-toaster-class=\"gatsby-code-button-toaster\"\n              data-toaster-text-class=\"gatsby-code-button-toaster-text\"\n              data-toaster-text=\"Copied to clipboard ✅\"\n              data-toaster-duration=\"3500\"\n              onClick=\"copyToClipboard(`// get the object\r\nvar @event = await graphServiceClient\r\n    .Me.Events[&quot;event-id&quot;]\r\n    .GetAsync();\r\n\r\n// the backing store will keep track that the property change and send the updated value.\r\n@event.Recurrence = null;// set to null \r\n\r\n// update the object\r\nawait graphServiceClient.Me.Events[&quot;event-id&quot;]\r\n    .PatchAsync(@event);`, `84137483106440270000`)\"\n            >\n              <div\n                class=\"gatsby-code-button\"\n                data-tooltip=\"\"\n              >\n                Copy<svg class=\"gatsby-code-button-icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path fill=\"none\" d=\"M0 0h24v24H0V0z\"/><path d=\"M16 1H2v16h2V3h12V1zm-1 4l6 6v12H6V5h9zm-1 7h5.5L14 6.5V12z\"/></svg>\n              </div>\n            </div>\n<div class=\"gatsby-highlight\" data-language=\"csharp\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-csharp line-numbers\"><code class=\"language-csharp\"><span class=\"token comment\">// get the object</span>\r\n<span class=\"token class-name\"><span class=\"token keyword\">var</span></span> @<span class=\"token keyword\">event</span> <span class=\"token operator\">=</span> <span class=\"token keyword\">await</span> graphServiceClient\r\n    <span class=\"token punctuation\">.</span>Me<span class=\"token punctuation\">.</span>Events<span class=\"token punctuation\">[</span><span class=\"token string\">\"event-id\"</span><span class=\"token punctuation\">]</span>\r\n    <span class=\"token punctuation\">.</span><span class=\"token function\">GetAsync</span><span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span>\r\n\r\n<span class=\"token comment\">// the backing store will keep track that the property change and send the updated value.</span>\r\n@<span class=\"token keyword\">event</span><span class=\"token punctuation\">.</span>Recurrence <span class=\"token operator\">=</span> <span class=\"token keyword\">null</span><span class=\"token punctuation\">;</span><span class=\"token comment\">// set to null </span>\r\n\r\n<span class=\"token comment\">// update the object</span>\r\n<span class=\"token keyword\">await</span> graphServiceClient<span class=\"token punctuation\">.</span>Me<span class=\"token punctuation\">.</span>Events<span class=\"token punctuation\">[</span><span class=\"token string\">\"event-id\"</span><span class=\"token punctuation\">]</span>\r\n    <span class=\"token punctuation\">.</span><span class=\"token function\">PatchAsync</span><span class=\"token punctuation\">(</span>@<span class=\"token keyword\">event</span><span class=\"token punctuation\">)</span><span class=\"token punctuation\">;</span></code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></pre></div>\n<p>Hope this helps many developers to quickly upgrade to the new version and enjoy a much better developer experience.</p>","timeToRead":4,"frontmatter":{"unformattedDate":"2024-04-18T00:00:00.000Z","date":"April 18, 2024","title":"Microsoft Graph SDK has changed, a lot!!!","subtitle":null,"id":null,"author":"Yaser Adel Mehraban","gravatar":null,"canonical_url":null,"tags":["microsoft","graphapi","graphsdk"],"thumbnail":null,"cover":{"childImageSharp":{"gatsbyImageData":{"layout":"constrained","placeholder":{"fallback":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAKCAIAAAA7N+mxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAB8klEQVR42h2M2Y7aQBRE/c/zFXnOU+YX8hRNZhQmJNGEpQ22wZjFeN8abGz34gXvoDSRjkqle6uKUzysRqWeVHpcOagOSPMA1z6uPdK6qDnRJszbc8ZMG9LmnLU+qU+4duOck865gbuVE8s+ViBRIdbPxAipFlLFjo5hZlwKI8zcuGBpSGr2NaMsre4Q19wc0tWl+j6TR8vdO78dL/fjxeYnkP+utZc//GyjzRXzQzz8mK1+i7uVCX8tZH5vh+XNSysOQCom9Qb3GhkcevPyIShvsLgFxT1k8+XdL+7wevfzm5vfvGw4V+wy6LhXoysHTlS6VEuXCjZZ+/n+fDWS2iGdR3uY90E22KS3cWeT1sKtiVsbtzpqjqjbhQUHrESyqWBg0c0kL5e8YuXl26AwksZCHcNIOw11GumO+MHDpK2Gu21YcuB4WTtEtpFgkbkez7UYaIngFoJXiA9K0S/F01WMGwl1QtRNzXYVNQfEygXHW0SY8sroZanHb0B9nR9GkimxtF+IQSnC8qFBybYUXH19HZ6ehvdDI9N2CXNOdOnbGHz5/Lww06WNeActPMLKUlBK8D/MsK1TtYmv3ybNp+d+4jRy2gKbcNMdnGvJhxrzZgoYFgIu5o0Lfwx5LeJVphdgI+BgxsJJxADxLgYWnqjRP90FDqL1EXa4AAAAAElFTkSuQmCC"},"backgroundColor":"transparent","images":{"fallback":{"src":"/static/1c004923284a09fab461cd0f2e2d6a57/a2195/socialpreview.png","srcSet":"/static/1c004923284a09fab461cd0f2e2d6a57/cadb4/socialpreview.png 750w,\n/static/1c004923284a09fab461cd0f2e2d6a57/a2195/socialpreview.png 800w","sizes":"(min-width: 800px) 800px, 100vw"},"sources":[{"srcSet":"/static/1c004923284a09fab461cd0f2e2d6a57/11ba1/socialpreview.webp 750w,\n/static/1c004923284a09fab461cd0f2e2d6a57/5f042/socialpreview.webp 800w","type":"image/webp","sizes":"(min-width: 800px) 800px, 100vw"}]},"width":800,"height":400}}},"img":null,"socialPreview":{"publicURL":"/static/1c004923284a09fab461cd0f2e2d6a57/socialpreview.png"}}}},"pageContext":{"title":"Microsoft Graph SDK has changed, a lot!!!","postPath":"/blog/2024/04/18/graph-sdk-v5","nextPost":"/blog/2024/04/30/semantic-kernel","previousPost":"/blog/2024/04/13/gatsby-upgrade"}},"staticQueryHashes":[],"slicesMap":{}}