{"id":2685,"date":"2023-08-11T19:39:20","date_gmt":"2023-08-11T18:39:20","guid":{"rendered":"https:\/\/mortenknudsen.net\/?p=2685"},"modified":"2023-08-11T19:39:22","modified_gmt":"2023-08-11T18:39:22","slug":"issue-connect-mggraph-method-not-found-system-action1-azure-identity-imsalpublicclientinitializeroptions-get_beforebuildclient","status":"publish","type":"post","link":"https:\/\/mortenknudsen.net\/?p=2685","title":{"rendered":"[issue] Connect-MgGraph : Method not found: &#8216;System.Action`1 Azure.Identity.IMsalPublicClientInitializerOptions.get_BeforeBuildClient()&#8217;."},"content":{"rendered":"\n<h2 class=\"wp-block-heading\"><br>Cause<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Old version of Az.Accounts v2.9.1 was being installed on the computer as part of Az.Portal installation, even though newer version was already found on the machine.\u00a0Temporary solution is to remove Az.Accounts v2.9.1 from the machine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Background<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Customer is running latest version of Az-modules. All old modules have been removed. But if the customer installs PS-module Az.Portal, then it will wrongly install an old version of Az.Accounts (v2.9.1), even a newer version is installed.<br><br>The impact is shown, when the customer tries to sign-on with Connect-MgGraph (v.2.3), where this error is thrown<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Connect-MgGraph : Method not found: &#8216;System.Action`1&lt;Microsoft.Identity.Client.PublicClientApplicationBuilder&gt; Azure.Identity.IMsalPublicClientInitializerOptions.get_BeforeBuildClient()&#8217;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Issue is escalated to MS, so Az.Portal will use newer version of Az.Accounts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cause Old version of Az.Accounts v2.9.1 was being installed on the computer as part of Az.Portal installation, even though newer &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"[issue] Connect-MgGraph : Method not found: &#8216;System.Action`1 Azure.Identity.IMsalPublicClientInitializerOptions.get_BeforeBuildClient()&#8217;.\" class=\"read-more button\" href=\"https:\/\/mortenknudsen.net\/?p=2685#more-2685\" aria-label=\"Read more about [issue] Connect-MgGraph : Method not found: &#8216;System.Action`1 Azure.Identity.IMsalPublicClientInitializerOptions.get_BeforeBuildClient()&#8217;.\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"ngg_post_thumbnail":0,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[154,55,156,134,157,60,132],"tags":[],"class_list":["post-2685","post","type-post","status-publish","format-standard","hentry","category-automation","category-azure","category-microsoft-graph","category-mvpbuzz","category-powershell","category-scripting","category-security","infinite-scroll-item"],"featured_image_src":null,"author_info":{"display_name":"Morten Knudsen","author_link":"https:\/\/mortenknudsen.net\/?author=1"},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/posts\/2685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2685"}],"version-history":[{"count":1,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/posts\/2685\/revisions"}],"predecessor-version":[{"id":2686,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/posts\/2685\/revisions\/2686"}],"wp:attachment":[{"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}