{"id":4235,"date":"2019-01-07T19:12:22","date_gmt":"2019-01-08T00:12:22","guid":{"rendered":"http:\/\/lisa.rushworth.us\/?p=4235"},"modified":"2019-01-08T09:28:20","modified_gmt":"2019-01-08T14:28:20","slug":"ugh-mfa","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=4235","title":{"rendered":"Ugh! MFA"},"content":{"rendered":"\n<p>I am trying to use Microsoft Graph to read\/write an Excel spreadsheet stored in SharePoint. It&#8217;s an ugly process to start with &#8212; they don&#8217;t exactly make it easy to find the <em>right<\/em> ID numbers so you can reference the spreadsheet in the first place, but I <em>finally<\/em> got the proper URL. And then I tried to do the password-based token authentication. <\/p>\n\n\n\n<p>{&#8220;error&#8221;:&#8221;invalid_grant&#8221;,&#8221;error_description&#8221;:&#8221;AADSTS70002: Error validating credentials. AADSTS50126: Invalid username or password\\r\\nTrace ID: b43d1973-c253-4889-8756-354e5bd77200\\r\\nCorrelation ID: 9cf94602-9d72-4790-8dcc-6cf0471058f9\\r\\nTimestamp: 2019-01-08 00:01:47Z&#8221;,&#8221;error_codes&#8221;:[70002,50126],&#8221;timestamp&#8221;:&#8221;2019-01-08 00:01:47Z&#8221;,&#8221;trace_id&#8221;:&#8221;b43d1973-c253-4889-8756-354e5bd77200&#8243;,&#8221;correlation_id&#8221;:&#8221;9cf94602-9d72-4790-8dcc-6cf0471058f9&#8243;}<\/p>\n\n\n\n<p>Hint: the password <em>isn&#8217;t<\/em> wrong. I&#8217;ve seen a lot of comments online about this meaning the <em>secret<\/em> is wrong &#8212; which seemed reasonable, since I&#8217;m not seeing any auth traffic against the user account. But if you put in a known bad secret, there is a different invalid secret error.<\/p>\n\n\n\n<p>{&#8220;error&#8221;:&#8221;invalid_client&#8221;,&#8221;error_description&#8221;:&#8221;AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.\\r\\nTrace ID: 59f4c7c8-73ab-4adb-bf15-10250a190d00\\r\\nCorrelation ID: 0a95810c-19e2-4fc6-a7be-c0ca7235d824\\r\\nTimestamp: 2019-01-08 00:00:37Z&#8221;,&#8221;error_codes&#8221;:[70002,50012],&#8221;timestamp&#8221;:&#8221;2019-01-08 00:00:37Z&#8221;,&#8221;trace_id&#8221;:&#8221;59f4c7c8-73ab-4adb-bf15-10250a190d00&#8243;,&#8221;correlation_id&#8221;:&#8221;0a95810c-19e2-4fc6-a7be-c0ca7235d824&#8243;}<\/p>\n\n\n\n<p><em><strong>But<\/strong> <\/em>we use MFA &#8230; and I&#8217;ve got no way to perform the MFA validation. Sigh!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am trying to use Microsoft Graph to read\/write an Excel spreadsheet stored in SharePoint. It&#8217;s an ugly process to start with &#8212; they don&#8217;t exactly make it easy to find the right ID numbers so you can reference the spreadsheet in the first place, but I finally got the proper URL. And then I &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33],"tags":[663,719,739],"class_list":["post-4235","post","type-post","status-publish","format-standard","hentry","category-coding","tag-azure-ad","tag-microsoft-graph","tag-multi-factor-authentication"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/4235","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4235"}],"version-history":[{"count":1,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/4235\/revisions"}],"predecessor-version":[{"id":4236,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/4235\/revisions\/4236"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4235"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4235"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4235"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}