{"id":24815,"date":"2018-06-14T09:00:23","date_gmt":"2018-06-14T07:00:23","guid":{"rendered":"https:\/\/nolabnoparty.com\/?p=24815"},"modified":"2018-06-14T11:05:24","modified_gmt":"2018-06-14T09:05:24","slug":"office-365-adfs-error-aadsts50008-unable-to-verify-token-signature","status":"publish","type":"post","link":"https:\/\/nolabnoparty.com\/en\/office-365-adfs-error-aadsts50008-unable-to-verify-token-signature\/","title":{"rendered":"Office 365 ADFS error \"AADSTS50008: Unable to verify token signature.\""},"content":{"rendered":"<p><img decoding=\"async\" class=\"aligncenter wp-image-24817 size-full\" title=\"office365-error-adfs-aadsts50008-01\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2018\/06\/office365-error-adfs-aadsts50008-01.jpg\" alt=\"office365-error-adfs-aadsts50008-01\" width=\"602\" height=\"202\" \/><\/p>\n<p>Trying to access an <a href=\"https:\/\/nolabnoparty.com\/en\/adfs-3-0-replace-ssl-certificate\/\">Office 365<\/a> mailbox via browser, the system returned the ADFS error \"<strong>AADSTS50008<\/strong>: Unable to verify token signature.\"<\/p>\n<p>After entering the credentials in the Office 365 portal, the following error is displayed:<!--more--><\/p>\n<blockquote><p>AADSTS50008: Unable to verify token signature. The signing key identifier does not match any valid registered\u00a0keys.<\/p><\/blockquote>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24818 size-large\" title=\"office365-error-adfs-aadsts50008-02\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2018\/06\/office365-error-adfs-aadsts50008-02-600x341.jpg\" alt=\"office365-error-adfs-aadsts50008-02\" width=\"600\" height=\"341\" \/><\/p>\n<p>Once confirmed that both <a href=\"https:\/\/nolabnoparty.com\/en\/adfs-3-0-install-adfs-server-pt-3\/\">ADFS<\/a> and <a href=\"https:\/\/nolabnoparty.com\/en\/adfs-3-0-install-wap-server-pt-4\/\">WAP<\/a> services are up and running with no issues, the <strong>Certificates status<\/strong> in the <strong>AD FS console<\/strong> is reported as shown in the picture below. The <strong>Token-decrypting<\/strong> certificate has been updated with a recent date.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24823 size-large\" title=\"office365-error-adfs-aadsts50008-03\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2018\/06\/office365-error-adfs-aadsts50008-03-600x225.jpg\" alt=\"office365-error-adfs-aadsts50008-03\" width=\"600\" height=\"225\" \/><\/p>\n<p>To fix this issue, I found a great post at\u00a0<a title=\"Robin CM&#039;s IT Blog\" href=\"https:\/\/rcmtech.wordpress.com\/\" rel=\"home noopener\" target=\"_blank\">Robin CM's IT Blog<\/a> with the correct PowerShell commands to run. Open the PowerShell console and type the following command to <strong>connect to Azure Active Directory<\/strong>:<\/p>\n<p><span style=\"color: #0000ff;\">PS C:\\ Connect-MsolService -Credential (Get-Credential)<\/span><\/p>\n<p>Enter your Office 365 <strong>admin credentials<\/strong> and click <strong>OK<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24824 size-large\" title=\"office365-error-adfs-aadsts50008-04\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2018\/06\/office365-error-adfs-aadsts50008-04-600x348.jpg\" alt=\"office365-error-adfs-aadsts50008-04\" width=\"600\" height=\"348\" \/><\/p>\n<p>Now type the following command to specify the server on which <strong>AD FS is running<\/strong>:<\/p>\n<p><span style=\"color: #0000ff;\">PS C:\\ Set-MsolADFSContext -Computer <em>w12r2-adfs01.nolabnoparty.local<\/em><\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24825 size-large\" title=\"office365-error-adfs-aadsts50008-05\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2018\/06\/office365-error-adfs-aadsts50008-05-600x96.jpg\" alt=\"office365-error-adfs-aadsts50008-05\" width=\"600\" height=\"96\" \/><\/p>\n<p>Since the certificate has changed in AD FS, you need to run the following command to <strong>update the new token decryption certificate<\/strong> in Azure Active Directory:<\/p>\n<p><span style=\"color: #0000ff;\">PS C:\\ Update-MsolFederatedDomain -DomainName <em>nolabnoparty.com<\/em><\/span><\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24826 size-large\" title=\"office365-error-adfs-aadsts50008-06\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2018\/06\/office365-error-adfs-aadsts50008-06-600x115.jpg\" alt=\"office365-error-adfs-aadsts50008-06\" width=\"600\" height=\"115\" \/><\/p>\n<p>After running the PowerShell commands, the Office 365 mailbox is <strong>accessible once again<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"aligncenter wp-image-24827 size-large\" title=\"office365-error-adfs-aadsts50008-07\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/2018\/06\/office365-error-adfs-aadsts50008-07-600x492.jpg\" alt=\"office365-error-adfs-aadsts50008-07\" width=\"600\" height=\"492\" \/><\/p>\n<p>You may <strong>wait some minutes<\/strong> after entering the commands before being able to access the mailbox.<\/p>\n<p><img decoding=\"async\" title=\"signature\" src=\"https:\/\/nolabnoparty.com\/wp-content\/uploads\/images\/firma.jpg\" alt=\"signature\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Trying to access an Office 365 mailbox via browser, the system returned the ADFS error \"AADSTS50008: Unable to verify token signature.\" After entering the credentials in the Office 365 portal, the following error is displayed:<\/p>\n","protected":false},"author":3,"featured_media":24817,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rop_custom_images_group":[],"rop_custom_messages_group":[],"rop_publish_now":"initial","rop_publish_now_accounts":{"linkedin_93tdZWzMZc_93tdZWzMZc":"","facebook_2879994398731222_17841400390232720":"","twitter_113568041_113568041":"","mastodon_115463926174894442_115463926174894442":""},"rop_publish_now_history":[],"rop_publish_now_status":"pending","footnotes":""},"categories":[1065,1721],"tags":[1880,1570,682,1583],"class_list":["post-24815","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-en","category-office365-en","tag-aadsts50008","tag-adfs-en","tag-certificate-en","tag-office365","has_thumb"],"_links":{"self":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/24815","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/comments?post=24815"}],"version-history":[{"count":0,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/posts\/24815\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media\/24817"}],"wp:attachment":[{"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/media?parent=24815"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/categories?post=24815"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nolabnoparty.com\/en\/wp-json\/wp\/v2\/tags?post=24815"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}