<?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/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>credentials &#8211; Captain 365</title>
	<atom:link href="https://captain-365.com/tag/credentials/feed/" rel="self" type="application/rss+xml" />
	<link>https://captain-365.com</link>
	<description>Exploring the Azure blue seas</description>
	<lastBuildDate>Mon, 11 May 2020 07:57:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
<site xmlns="com-wordpress:feed-additions:1">182898163</site>	<item>
		<title>Connecting Powershell with Office 365 using credential manager</title>
		<link>https://captain-365.com/connecting-powershell-with-office-365-using-credential-manager/</link>
					<comments>https://captain-365.com/connecting-powershell-with-office-365-using-credential-manager/#respond</comments>
		
		<dc:creator><![CDATA[Captain 365]]></dc:creator>
		<pubDate>Mon, 11 May 2020 07:57:02 +0000</pubDate>
				<category><![CDATA[Office 365]]></category>
		<category><![CDATA[Powershell]]></category>
		<category><![CDATA[connect]]></category>
		<category><![CDATA[credential manager]]></category>
		<category><![CDATA[credentials]]></category>
		<guid isPermaLink="false">https://www.aldodb.com/?p=63</guid>

					<description><![CDATA[I use a script made by Michel de Rooij which is updated regularly. I can recommend using this script. You can find it here. I have altered this a bit so I don’t have to add my credentials every time. One of the safest ways I could find to add my credentials without exposing them ... <a title="Connecting Powershell with Office 365 using credential manager" class="read-more" href="https://captain-365.com/connecting-powershell-with-office-365-using-credential-manager/" aria-label="Read more about Connecting Powershell with Office 365 using credential manager">Read more</a>]]></description>
										<content:encoded><![CDATA[
<p>I use a script made by Michel de Rooij which is updated regularly. I can recommend using this script. You can find it here. I have altered this a bit so I don’t have to add my credentials every time.</p>



<p>One of the safest ways I could find to add my credentials without exposing them is using the credential manager in &nbsp;Windows 10 or Windows Server. In the control panel you will find the Credential Manager.</p>



<div class="wp-block-image"><figure class="aligncenter size-large is-resized"><img data-recalc-dims="1" fetchpriority="high" decoding="async" src="https://i0.wp.com/www.aldodb.com/wp-content/uploads/2020/05/CredentialManager01.jpg?resize=799%2C220&#038;ssl=1" alt="" class="wp-image-64" width="799" height="220"/></figure></div>



<p>You can add credentials here you can then use in PowerShell. Add a Windows Credential that you use for Authentication to Office 365. For instance a user that is also a Global Administrator in your tenant.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img data-recalc-dims="1" decoding="async" src="https://i0.wp.com/www.aldodb.com/wp-content/uploads/2020/05/CredentialManager02.jpg?w=900&#038;ssl=1" alt="" class="wp-image-65"/></figure></div>



<p>In PowerShell you can then reference to its name (<em>adb_admin_cred</em>) and store the credentials in a variable. I wrote a little function for myself to do this for me.</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"></div>



<div class="wp-block-urvanov-syntax-highlighter-code-block"></div>



<div class="wp-block-urvanov-syntax-highlighter-code-block"></div>



<pre class="wp-block-code"><code>
function Get-adb-localCredential{
    
Import-Module CredentialManager

$cr = Get-StoredCredential -Target 'adb_admin_cred' 
           
     return $cr 

} #End function
</code></pre>



<p>In a script I can then use the function and get the credential and connect to an Office 365 Service like Microsoft Teams or SharePoint Online.</p>



<pre class="wp-block-code"><code>Connect-MicrosoftTeams -Credential (Get-adb-localCredential) </code></pre>



<p></p>
]]></content:encoded>
					
					<wfw:commentRss>https://captain-365.com/connecting-powershell-with-office-365-using-credential-manager/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">63</post-id>	</item>
	</channel>
</rss>
