{"id":2755,"date":"2023-10-10T16:15:06","date_gmt":"2023-10-10T15:15:06","guid":{"rendered":"https:\/\/mortenknudsen.net\/?p=2755"},"modified":"2023-10-10T16:15:08","modified_gmt":"2023-10-10T15:15:08","slug":"issue-connect-azaccount-method-not-found-system-threading-tasks-task","status":"publish","type":"post","link":"https:\/\/mortenknudsen.net\/?p=2755","title":{"rendered":"[issue] Connect-AzAccount : Method not found: System.Threading.Tasks.Task"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Error<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Connect-AzAccount : Method not found: &#8216;System.Threading.Tasks.Task`1 Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext, System.Threading.CancellationToken)&#8217;.<br>Could not find tenant id for provided tenant domain &#8216;xxxxxx&#8217;. Please ensure that the provided user is found in the provided tenant domain.<br>At line:1 char:1<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Connect-AzAccount -Tenant &#8220;xxxxxx&#8221;<\/li>\n\n\n\n<li><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del><del>~<\/del>~~~~\n<ul class=\"wp-block-list\">\n<li>CategoryInfo : CloseError: (:) [Connect-AzAccount], ArgumentNullException<\/li>\n\n\n\n<li>FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Run <strong>Clear-AzContext<\/strong><\/li>\n\n\n\n<li>Delete folder <strong>C:\\Users\\&lt;userid>\\.Azure<\/strong><\/li>\n\n\n\n<li>Close-down Powershell \/ Powershell ISE and start Powershell again<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Background<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Az-module was updated to latest version, but was throwing the above error when connecting to Azure.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Error Connect-AzAccount : Method not found: &#8216;System.Threading.Tasks.Task`1 Azure.Identity.InteractiveBrowserCredential.AuthenticateAsync(Azure.Core.TokenRequestContext, System.Threading.CancellationToken)&#8217;.Could not find tenant id for provided tenant domain &#8216;xxxxxx&#8217;. Please ensure &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"[issue] Connect-AzAccount : Method not found: System.Threading.Tasks.Task\" class=\"read-more button\" href=\"https:\/\/mortenknudsen.net\/?p=2755#more-2755\" aria-label=\"Read more about [issue] Connect-AzAccount : Method not found: System.Threading.Tasks.Task\">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_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[55,57,133,134,157,132],"tags":[],"class_list":["post-2755","post","type-post","status-publish","format-standard","hentry","category-azure","category-azure-security","category-microsoft-security","category-mvpbuzz","category-powershell","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\/2755","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=2755"}],"version-history":[{"count":1,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/posts\/2755\/revisions"}],"predecessor-version":[{"id":2756,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=\/wp\/v2\/posts\/2755\/revisions\/2756"}],"wp:attachment":[{"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mortenknudsen.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}