{"id":26,"date":"2022-09-25T20:16:47","date_gmt":"2022-09-25T20:16:47","guid":{"rendered":"http:\/\/nkascocom.nk\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/"},"modified":"2024-03-04T16:49:57","modified_gmt":"2024-03-04T21:49:57","slug":"2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell","status":"publish","type":"post","link":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/","title":{"rendered":"How to Authenticate to the Microsoft Graph API using PowerShell"},"content":{"rendered":"\n<p>APIs are quickly becoming more and more prevalent in the SysAdmin\/DevOps space and one of the most powerful resources is the Microsoft Graph API. Why? One thing I\u2019ve had front of mind is the realization that often times these public APIs are available prior to UI integrations within web portals or consoles. What this often means is that if the thing you\u2019re looking for doesn\u2019t exist, create it!<\/p>\n\n\n\n<div class=\"sqs-html-content\">\n<p class=\"\" style=\"white-space: pre-wrap;\">The reason why I decided to make this guide is that most of the time when I\u2019ve been looking up guidance or information on this topic, I end up finding a narrow example that doesn\u2019t help me understand all the options available. A common misconception I also hear is that people are just looking for how to pull an access token for Graph, but this is a bit too broad and has led me down a path of confusion in the past where I was trying methods that ultimately did not work. Understanding what methods are available to meet your needs will help you equip yourself to have an informed conversation with your Cloud\/Security teams to evaluate what makes the most sense for your own scenarios.<\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\">I recognize that not all of us come from a development background, so this 3 part guide is going to help provide some tangible examples and guidance around what I think the hardest part about using the Graph API is, authentication. Each part will be broken down as follows:<\/p>\n<ul data-rte-list=\"default\">\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">Part 1: Intro (Identifying the required permissions for your use case)<\/p>\n<\/li>\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">Part 2: Application Permissions<\/p>\n<\/li>\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">Part 3: Delegated Permissions<\/p>\n<\/li>\n<\/ul>\n<p class=\"\" style=\"white-space: pre-wrap;\">Typically, the process begins with the identification of what exactly you are trying to achieve and then finding the necessary permission scopes and type that are available. Understanding this is critical as there are 2 primary types of permissions: <strong>Delegated and Application<\/strong>. In either case, scripts <em>can<\/em> run interactively or non-interactively. I will say though that it\u2019s generally easier, more secure, and less overhead to use <em>application permissions<\/em> if your script needs to run non-interactively. Here\u2019s how I think of them:<\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\"><em>Note: Microsoft Documentation on this topic is available <\/em><a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/auth\/auth-concepts#delegated-and-application-permissions\" target=\"_blank\" rel=\"noopener\"><em>here<\/em><\/a><em>.<\/em><\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\"><strong>Application Permissions:<\/strong> The access token pulled performs actions without a user account.<\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\"><strong>Delegated Permissions:<\/strong> The access token pulled performs actions on behalf of the user that is authenticated when requesting the token.<\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\">The reason why this is so important to understand is that the methods that are available to authenticate can vary based on what types of permissions are required for the use case. <strong>You should never mix Application Permissions with Delegated Permissions.<\/strong><\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\"><strong>Example:<\/strong> Let\u2019s say you want to create a script that can silently pull device data out of Intune and export it to a CSV on an automated schedule. Since we know we want our script to run non-interactively on a schedule, therefore if there are application permissions available, that would be the preferred option.<\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\"><em>Note: In some cases, Application or Delegated permissions might not be available, which may require some creativity to meet your needs.<\/em><\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\">Follow these steps to find the necessary permissions for the use case at hand:<\/p>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"661\" height=\"218\" src=\"http:\/\/nkascocom.nk\/wordpress\/wp-content\/uploads\/2024\/03\/permissions.png\" alt=\"\" class=\"wp-image-113\" srcset=\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/permissions.png 661w, https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/permissions-300x99.png 300w\" sizes=\"(max-width: 661px) 100vw, 661px\" \/><\/figure>\n\n\n\n<div class=\"sqs-html-content\">\n<ol data-rte-list=\"default\">\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">Head over to the <a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/overview?view=graph-rest-1.0\" target=\"_blank\" rel=\"noopener\">Microsoft Graph REST API reference<\/a> page (Keep in mind there are 1.0 and beta versions available currently)<\/p>\n<ul data-rte-list=\"default\">\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">I often find myself searching Google instead, in this case, I\u2019d search \u201cget device graph api\u201d which will lead you here: <a href=\"https:\/\/learn.microsoft.com\/en-us\/graph\/api\/device-get?view=graph-rest-1.0&amp;tabs=http\">https:\/\/learn.microsoft.com\/en-us\/graph\/api\/device-get?view=graph-rest-1.0&amp;tabs=http<\/a><\/p>\n<\/li>\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">Another option would be to use this <a href=\"https:\/\/docs.microsoft.com\/en-us\/powershell\/microsoftgraph\/find-mg-graph-permission?view=graph-powershell-1.0\" target=\"_blank\" rel=\"noopener\">cmdlet from the Microsoft.Graph<\/a> module<\/p>\n<pre><code>Find-MgGraphPermission device<\/code><\/pre>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">We can see that in our example use case, there are permission sets available for both Application and Delegated to get device data. As mentioned above, our preference in this case would be to use Application.<\/p>\n<\/li>\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">The least privileged Application permission required for our use case is <strong>Device.Read.All<\/strong>.<\/p>\n<ul data-rte-list=\"default\">\n<li>\n<p class=\"\" style=\"white-space: pre-wrap;\">Keep this jotted down as it will be required later.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p class=\"\" style=\"white-space: pre-wrap;\">Microsoft Graph authentication is built upon the Microsoft Identity Platform for which the best way I\u2019ve found to authenticate is by using 1 of 2 available modules: <a href=\"https:\/\/github.com\/AzureAD\/MSAL.PS\" target=\"_blank\" rel=\"noopener\"><strong>MSAL.PS<\/strong><\/a> or <a href=\"https:\/\/github.com\/microsoftgraph\/msgraph-sdk-powershell\" target=\"_blank\" rel=\"noopener\"><strong>Microsoft Graph PowerShell<\/strong><\/a>. However, ultimately the Microsoft Graph PowerShell module is suggested to use once a token has been retrieved as it cleanly handles passing the token in the request headers automatically, and there are many cmdlets available to simplify the process. With that said, it is not absolutely mandatory to use if you find a gap or cannot use it in your environment for whatever reason.<\/p>\n<p class=\"\" style=\"white-space: pre-wrap;\">Now that you\u2019ve identified what types of permissions are needed for your use case, click the corresponding link below for more information on next steps. This will help you understand what is required regarding the configuration of an Azure AD App Registration as well as how to actually make the proper authentication call from PowerShell:<\/p>\n<\/div>\n\n\n\n<div class=\"sqs-block-button-container sqs-block-button-container--left\" data-animation-role=\"button\" data-alignment=\"left\" data-button-size=\"medium\" data-button-type=\"primary\"><br><a class=\"sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element\" href=\"\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell-application-permissions-part-2\/\"><br>Application Permissions Authentication Guide<br><\/a><\/div>\n\n\n\n<div class=\"sqs-block-button-container sqs-block-button-container--left\" data-animation-role=\"button\" data-alignment=\"left\" data-button-size=\"medium\" data-button-type=\"primary\"><br><a class=\"sqs-block-button-element--medium sqs-button-element--primary sqs-block-button-element\" href=\"\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell-delegated-permissions-part-3\/\"><br>Delegated Permissions Authentication Guide<br><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>APIs are quickly becoming more and more prevalent in the SysAdmin\/DevOps space and one of the most powerful resources is the Microsoft Graph API. Why? One thing I\u2019ve had front of mind is the realization that often times these public APIs are available prior to UI integrations within web portals or consoles. What this often [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":27,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Authenticate to the Microsoft Graph API using PowerShell - Nathan Kasco - Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Authenticate to the Microsoft Graph API using PowerShell - Nathan Kasco - Blog\" \/>\n<meta property=\"og:description\" content=\"APIs are quickly becoming more and more prevalent in the SysAdmin\/DevOps space and one of the most powerful resources is the Microsoft Graph API. Why? One thing I\u2019ve had front of mind is the realization that often times these public APIs are available prior to UI integrations within web portals or consoles. What this often [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/\" \/>\n<meta property=\"og:site_name\" content=\"Nathan Kasco - Blog\" \/>\n<meta property=\"article:published_time\" content=\"2022-09-25T20:16:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-04T21:49:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"960\" \/>\n\t<meta property=\"og:image:height\" content=\"504\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nate Kasco\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@Bu5yGiraffe\" \/>\n<meta name=\"twitter:site\" content=\"@Bu5yGiraffe\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nate Kasco\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/\"},\"author\":{\"name\":\"Nate Kasco\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\"},\"headline\":\"How to Authenticate to the Microsoft Graph API using PowerShell\",\"datePublished\":\"2022-09-25T20:16:47+00:00\",\"dateModified\":\"2024-03-04T21:49:57+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/\"},\"wordCount\":817,\"publisher\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\"},\"image\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png\",\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/\",\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/\",\"name\":\"How to Authenticate to the Microsoft Graph API using PowerShell - Nathan Kasco - Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png\",\"datePublished\":\"2022-09-25T20:16:47+00:00\",\"dateModified\":\"2024-03-04T21:49:57+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage\",\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png\",\"contentUrl\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png\",\"width\":960,\"height\":504},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.nkasco.com\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Authenticate to the Microsoft Graph API using PowerShell\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#website\",\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/\",\"name\":\"Nathan Kasco - Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.nkasco.com\/wordpress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3\",\"name\":\"Nate Kasco\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\",\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\",\"contentUrl\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\",\"width\":200,\"height\":200,\"caption\":\"Nate Kasco\"},\"logo\":{\"@id\":\"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png\"},\"sameAs\":[\"http:\/\/nkascocom.nk\/wordpress\",\"https:\/\/x.com\/Bu5yGiraffe\"],\"url\":\"https:\/\/blog.nkasco.com\/wordpress\/index.php\/author\/nate\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Authenticate to the Microsoft Graph API using PowerShell - Nathan Kasco - Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/","og_locale":"en_US","og_type":"article","og_title":"How to Authenticate to the Microsoft Graph API using PowerShell - Nathan Kasco - Blog","og_description":"APIs are quickly becoming more and more prevalent in the SysAdmin\/DevOps space and one of the most powerful resources is the Microsoft Graph API. Why? One thing I\u2019ve had front of mind is the realization that often times these public APIs are available prior to UI integrations within web portals or consoles. What this often [&hellip;]","og_url":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/","og_site_name":"Nathan Kasco - Blog","article_published_time":"2022-09-25T20:16:47+00:00","article_modified_time":"2024-03-04T21:49:57+00:00","og_image":[{"width":960,"height":504,"url":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png","type":"image\/png"}],"author":"Nate Kasco","twitter_card":"summary_large_image","twitter_creator":"@Bu5yGiraffe","twitter_site":"@Bu5yGiraffe","twitter_misc":{"Written by":"Nate Kasco","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#article","isPartOf":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/"},"author":{"name":"Nate Kasco","@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3"},"headline":"How to Authenticate to the Microsoft Graph API using PowerShell","datePublished":"2022-09-25T20:16:47+00:00","dateModified":"2024-03-04T21:49:57+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/"},"wordCount":817,"publisher":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3"},"image":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png","inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/","url":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/","name":"How to Authenticate to the Microsoft Graph API using PowerShell - Nathan Kasco - Blog","isPartOf":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage"},"image":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png","datePublished":"2022-09-25T20:16:47+00:00","dateModified":"2024-03-04T21:49:57+00:00","breadcrumb":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#primaryimage","url":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png","contentUrl":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2022\/09\/graphapilogo.png","width":960,"height":504},{"@type":"BreadcrumbList","@id":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/2022\/09\/25\/2022-9-25-how-to-authenticate-to-the-microsoft-graph-api-using-powershell\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.nkasco.com\/wordpress\/"},{"@type":"ListItem","position":2,"name":"How to Authenticate to the Microsoft Graph API using PowerShell"}]},{"@type":"WebSite","@id":"https:\/\/blog.nkasco.com\/wordpress\/#website","url":"https:\/\/blog.nkasco.com\/wordpress\/","name":"Nathan Kasco - Blog","description":"","publisher":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.nkasco.com\/wordpress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/blog.nkasco.com\/wordpress\/#\/schema\/person\/1dfd694a2ed094a43a37dc6882c65eb3","name":"Nate Kasco","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png","url":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png","contentUrl":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png","width":200,"height":200,"caption":"Nate Kasco"},"logo":{"@id":"https:\/\/blog.nkasco.com\/wordpress\/wp-content\/uploads\/2024\/03\/cropped-logo.png"},"sameAs":["http:\/\/nkascocom.nk\/wordpress","https:\/\/x.com\/Bu5yGiraffe"],"url":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/author\/nate\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":3,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"predecessor-version":[{"id":114,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/26\/revisions\/114"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media\/27"}],"wp:attachment":[{"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.nkasco.com\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}