{"id":4628,"date":"2026-02-06T10:44:19","date_gmt":"2026-02-06T09:44:19","guid":{"rendered":"https:\/\/lieben.nu\/liebensraum\/?p=4628"},"modified":"2026-02-06T10:55:56","modified_gmt":"2026-02-06T09:55:56","slug":"silent-provisioning-of-fido-key-to-use-for-headless-requests-against-hidden-apis","status":"publish","type":"post","link":"https:\/\/lieben.nu\/liebensraum\/2026\/02\/silent-provisioning-of-fido-key-to-use-for-headless-requests-against-hidden-apis\/","title":{"rendered":"Silent provisioning of Fido key to use for headless requests against hidden API&#8217;s"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">So there&#8217;s this problem with lots of Microsoft API&#8217;s not allowing service principals to call them. I&#8217;ve written about this a few times in the past \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These api&#8217;s want a user. And a user has to do MFA, right?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Not with this! <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"667\" src=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image-1-1024x667.png\" alt=\"\" class=\"wp-image-4630\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image-1-1024x667.png 1024w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image-1-300x195.png 300w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image-1-768x500.png 768w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image-1.png 1058w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When I read <a href=\"https:\/\/www.linkedin.com\/posts\/nathanmcnulty_%F0%9D%9A%82%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9A%92%F0%9D%9A%97%F0%9D%9A%90-borrowing-from-activity-7425081295334158336-yxIS?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAAAIJDAQB6wUJXlWJcWIImWA4SWnSEhSHFjE\" data-type=\"link\" data-id=\"https:\/\/www.linkedin.com\/posts\/nathanmcnulty_%F0%9D%9A%82%F0%9D%9A%9D%F0%9D%9A%8E%F0%9D%9A%8A%F0%9D%9A%95%F0%9D%9A%92%F0%9D%9A%97%F0%9D%9A%90-borrowing-from-activity-7425081295334158336-yxIS?utm_source=share&amp;utm_medium=member_desktop&amp;rcm=ACoAAAIJDAQB6wUJXlWJcWIImWA4SWnSEhSHFjE\">Nathan McNulty&#8217;s LinkedIn post<\/a> this morning I got a bit hyped and just HAD to get it working. He has a way to use a stored passkey to log in silently to all admin portals\/hidden api&#8217;s etc.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The missing part I wanted to solve, is to actually generate that passkey for a given global admin in the tenant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Took a bit of messing around with how to generate the keys using a virtual authenticator, but it works! Here it is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/jflieben\/assortedFunctionsV2\/blob\/main\/New-FidoKey.ps1\">https:\/\/github.com\/jflieben\/assortedFunctionsV2\/blob\/main\/New-FidoKey.ps1<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So basically:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>register app with client id\/secret and UserAuthenticationMethod.ReadWrite.All<\/li>\n\n\n\n<li>run New-FidoKey<\/li>\n\n\n\n<li>use the file it outputs with <a href=\"https:\/\/github.com\/nathanmcnulty\/nathanmcnulty\/blob\/main\/Entra\/passkeys\/PasskeyLogin.ps1\">Nathan&#8217;s passkey login function<\/a><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">I should also give an honorary mention to <a href=\"https:\/\/www.linkedin.com\/in\/fabianbader\/\">Fabian Bader<\/a> for the work he did to get us here!<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"793\" height=\"332\" src=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image.png\" alt=\"\" class=\"wp-image-4629\" srcset=\"https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image.png 793w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image-300x126.png 300w, https:\/\/lieben.nu\/liebensraum\/wp-content\/uploads\/2026\/02\/image-768x322.png 768w\" sizes=\"auto, (max-width: 793px) 100vw, 793px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">disclaimer: don&#8217;t store this stuff where anyone can find it!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">disclaimer2: you&#8217;ll have to set your fido policy to allow not force attestion or key restrictions<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So there&#8217;s this problem with lots of Microsoft API&#8217;s not allowing service principals to call them. I&#8217;ve written about this a few times in the past \ud83d\ude42 These api&#8217;s want a user. And a user has to do MFA, right? Not with this! When I read Nathan McNulty&#8217;s LinkedIn post this morning I got a &hellip; <a href=\"https:\/\/lieben.nu\/liebensraum\/2026\/02\/silent-provisioning-of-fido-key-to-use-for-headless-requests-against-hidden-apis\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Silent provisioning of Fido key to use for headless requests against hidden API&#8217;s<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[4,13,39,43],"tags":[],"class_list":["post-4628","post","type-post","status-publish","format-standard","hentry","category-automation","category-entraid","category-powershell","category-security"],"_links":{"self":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/comments?post=4628"}],"version-history":[{"count":3,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4628\/revisions"}],"predecessor-version":[{"id":4633,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/posts\/4628\/revisions\/4633"}],"wp:attachment":[{"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/media?parent=4628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/categories?post=4628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lieben.nu\/liebensraum\/wp-json\/wp\/v2\/tags?post=4628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}