<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AADSTS700016 &#8211; Miroslav Šraga</title>
	<atom:link href="https://www.sraga.cz/tag/aadsts700016/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.sraga.cz</link>
	<description>Sdílím své zkušenosti s Microsoft 365 a Azure</description>
	<lastBuildDate>Sat, 08 Feb 2025 12:48:06 +0000</lastBuildDate>
	<language>cs</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9</generator>
	<item>
		<title>PnP.PowerShell &#8211; AADSTS700016: Application with identifier was not found in the directory</title>
		<link>https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/</link>
					<comments>https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/#respond</comments>
		
		<dc:creator><![CDATA[Miroslav Šraga]]></dc:creator>
		<pubDate>Sat, 08 Feb 2025 09:30:44 +0000</pubDate>
				<category><![CDATA[PowerShell]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[AADSTS700016]]></category>
		<category><![CDATA[PnP PowerShell]]></category>
		<category><![CDATA[Sharepoint Online]]></category>
		<guid isPermaLink="false">https://www.sraga.cz/?p=946</guid>

					<description><![CDATA[AADSTS700016: Application with identifier &#8218;31359c7f-bd7e-475c-86db-fdb8c937548e&#8216; was not found in the directory &#8218;&#8218;. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant. PnP.PowerShell Pokud se Vám nedaří zaregistrovat do ... <a title="PnP.PowerShell &#8211; AADSTS700016: Application with identifier was not found in the directory" class="read-more" href="https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/" aria-label="Číst více o PnP.PowerShell &#8211; AADSTS700016: Application with identifier was not found in the directory">Číst dál</a>]]></description>
										<content:encoded><![CDATA[		<div data-elementor-type="wp-post" data-elementor-id="946" class="elementor elementor-946" data-elementor-post-type="post">
				<div class="elementor-element elementor-element-8748935 e-flex e-con-boxed e-con e-parent" data-id="8748935" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-6913984 elementor-blockquote--skin-boxed elementor-widget elementor-widget-blockquote" data-id="6913984" data-element_type="widget" data-widget_type="blockquote.default">
				<div class="elementor-widget-container">
							<blockquote class="elementor-blockquote">
			<p class="elementor-blockquote__content">
				AADSTS700016: Application with identifier '31359c7f-bd7e-475c-86db-fdb8c937548e' was not found in the directory ''. This can happen if the application has not been installed by the administrator of the tenant or consented to by any user in the tenant. You may have sent your authentication request to the wrong tenant.			</p>
							<div class="e-q-footer">
											<cite class="elementor-blockquote__author">PnP.PowerShell</cite>
														</div>
					</blockquote>
						</div>
				</div>
				<div class="elementor-element elementor-element-313cb78 elementor-widget elementor-widget-text-editor" data-id="313cb78" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Pokud se Vám nedaří zaregistrovat do tenantu <a href="https://www.sraga.cz/tag/pnp-powershell/" target="_blank" rel="noopener">PnP.PowerShell</a> a vrací se Vám výše uvedená chyba, zde je postup, jak ji lze celkem rychle vyřešit.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-193dc44 elementor-widget elementor-widget-image" data-id="193dc44" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp.powershell-AADSTS700016" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTUwLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvcG5wLnBvd2Vyc2hlbGwtQUFEU1RTNzAwMDE2LnBuZyJ9">
							<img fetchpriority="high" decoding="async" width="737" height="787" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016.png" class="attachment-medium_large size-medium_large wp-image-950" alt="pnp.powershell AADSTS700016" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016.png 737w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-AADSTS700016-281x300.png 281w" sizes="(max-width: 737px) 100vw, 737px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-5fb8322 elementor-widget elementor-widget-text-editor" data-id="5fb8322" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Je potřeba <strong>zaregistrovat ID aplikace</strong> v Microsoft Entra pro <a href="https://www.sraga.cz/instalace-pnp-powershell/" target="_blank" rel="noopener">PnP PowerShell</a>. Po instalaci modulu PnP.PowerShell postupujte takto:</p>								</div>
				</div>
					</div>
				</div>
		<div class="elementor-element elementor-element-83f4a35 e-flex e-con-boxed e-con e-parent" data-id="83f4a35" data-element_type="container">
					<div class="e-con-inner">
				<div class="elementor-element elementor-element-ce30485 elementor-widget elementor-widget-code-block-for-elementor" data-id="ce30485" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Register-PnPEntraIDAppForInteractiveLogin -ApplicationName &quot;PnP PowerShell&quot; -SharePointDelegatePermissions &quot;AllSites.FullControl&quot; -Tenant vastenant.onmicrosoft.com -Interactive
</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-b4420f7 elementor-widget elementor-widget-text-editor" data-id="b4420f7" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Tento příkaz zaregistruje aplikaci v Entra ID. Pozor na identifikátor tenantu (-Tenant) &#8211; musíte zadat fallback doménu vašeho tenantu.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-096b507 elementor-widget elementor-widget-image" data-id="096b507" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
															<img decoding="async" width="900" height="352" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-1024x401.png" class="attachment-large size-large wp-image-952" alt="pnp.powershell registred app" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-1024x401.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-300x118.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app-768x301.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-app.png 1439w" sizes="(max-width: 900px) 100vw, 900px">															</div>
				</div>
				<div class="elementor-element elementor-element-1e9829c elementor-widget elementor-widget-text-editor" data-id="1e9829c" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>V Entra ID si můžete ověřit, že je aplikace &#8222;PnP PowerShell&#8220; skutečně zaregistrovaná a rovnou si poznačte Application ID (= Client ID).</p><p>Občas se stane, že výše uvedený příkaz skončí chybou. Alternativně můžete použít příkaz v kontextu <strong>Globálního správce</strong>:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-38c213e elementor-widget elementor-widget-code-block-for-elementor" data-id="38c213e" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'>Register-PnPEntraIDApp -ApplicationName &quot;PnP PowerShell&quot; -Tenant vastenant.onmicrosoft.com -Interactive</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-b1d5295 elementor-widget elementor-widget-image" data-id="b1d5295" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp.powershell-grant-permissions" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTUzLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvcG5wLnBvd2Vyc2hlbGwtZ3JhbnQtcGVybWlzc2lvbnMucG5nIn0%3D">
							<img decoding="async" width="300" height="273" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions-300x273.png" class="attachment-medium size-medium wp-image-953" alt="pnp powershell grant permissions" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions-300x273.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-grant-permissions.png 660w" sizes="(max-width: 300px) 100vw, 300px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-ac673bb elementor-widget elementor-widget-text-editor" data-id="ac673bb" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Po úspěšném dokončení příkazu bude zaregistrovaná Enterprise Aplikace v Entra ID. I v tomto případě si poznačte Application ID.</p>								</div>
				</div>
				<div class="elementor-element elementor-element-9cd5d85 elementor-widget elementor-widget-image" data-id="9cd5d85" data-element_type="widget" data-widget_type="image.default">
				<div class="elementor-widget-container">
																<a href="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred.png" data-elementor-open-lightbox="yes" data-elementor-lightbox-title="pnp.powershell-registred" data-e-action-hash="#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6OTUxLCJ1cmwiOiJodHRwczpcL1wvd3d3LnNyYWdhLmN6XC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI1XC8wMlwvcG5wLnBvd2Vyc2hlbGwtcmVnaXN0cmVkLnBuZyJ9">
							<img loading="lazy" decoding="async" width="900" height="267" src="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-1024x304.png" class="attachment-large size-large wp-image-951" alt="Pnp PowerShell - Application ID" srcset="https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-1024x304.png 1024w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-300x89.png 300w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-768x228.png 768w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred-1536x456.png 1536w, https://www.sraga.cz/wp-content/uploads/2025/02/pnp.powershell-registred.png 1900w" sizes="(max-width: 900px) 100vw, 900px" />								</a>
															</div>
				</div>
				<div class="elementor-element elementor-element-928625d elementor-widget elementor-widget-text-editor" data-id="928625d" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Jakmile je aplikace správně zaregistrovaná, lze se k <a href="https://www.sraga.cz/tag/pnp-powershell/" target="_blank" rel="noopener">PnP PowerShell</a> připojit následujícím způsobem:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-279db15 elementor-widget elementor-widget-code-block-for-elementor" data-id="279db15" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'># Enterprise Application ID = Client ID
$ClientID = &quot;cf1fd5c4-XXXXX-XXXXX-XXXXXX-YYYYYYYYYY&quot;

# Connect to Sharepoint site - edit URL parameter
Connect-PnPOnline -url https://vastenant.sharepoint.com/sites/vaseSite -Interactive -ClientId $ClientID</code></pre>				</div>
				</div>
				<div class="elementor-element elementor-element-31f8858 elementor-widget elementor-widget-text-editor" data-id="31f8858" data-element_type="widget" data-widget_type="text-editor.default">
				<div class="elementor-widget-container">
									<p>Application ID lze také uložit do systémové proměnné. Já tuto variantu nepoužívám, protože se často hlásím do více tenantů a raději používám proměnné v kódu. Registrace systémové proměnné a připojení k Sharepoint site:</p>								</div>
				</div>
				<div class="elementor-element elementor-element-19fe89c elementor-widget elementor-widget-code-block-for-elementor" data-id="19fe89c" data-element_type="widget" data-widget_type="code-block-for-elementor.default">
				<div class="elementor-widget-container">
					<pre class='line-numbers theme-okaidia' data-show-toolbar='yes'><code class='language-powershell'># Enterprise Application ID = Client ID
$ClientID = &quot;cf1fd5c4-XXXXX-XXXXX-XXXXXX-YYYYYYYYYY&quot;

# Add Enterprise Application ID to Environment variable
[System.Environment]::SetEnvironmentVariable(&quot;ENTRAID_CLIENT_ID&quot;, $ClientID, [EnvironmentVariableTarget]::User)

# Connect to SharePoint Online site
Connect-PnPOnline -Url &quot;https://vastenant.sharepoint.com/sites/vaseSite&quot; -Interactive</code></pre>				</div>
				</div>
					</div>
				</div>
				</div>
		]]></content:encoded>
					
					<wfw:commentRss>https://www.sraga.cz/pnp-powershell-aadsts700016-application-with-identifier-was-not-found-in-the-directory/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
