{"id":1579,"date":"2018-03-27T08:54:18","date_gmt":"2018-03-27T06:54:18","guid":{"rendered":"https:\/\/msb365.abstergo.ch\/?p=1579"},"modified":"2023-06-23T13:25:31","modified_gmt":"2023-06-23T11:25:31","slug":"o365-password-expiration","status":"publish","type":"post","link":"https:\/\/www.msb365.blog\/?p=1579","title":{"rendered":"Customize Password Expiration in Office 365"},"content":{"rendered":"<p>Having password policies in a company is good! Very good! And important!<\/p>\n<p>Using on-premises active directory and GPO\u2019s makes it very easy to handle password policies. If we have an Office 365 environment managed by Microsoft onboard tools such as ADFS and AAC we also don\u2019t have to think to far how to handle password policies.<\/p>\n<p>However, what about some cloud only service accounts or cloud only Admin accounts? There are always accounts in the cloud, which are \u201cout of the policy\u201d. Using on-premises active directory, we simply can set the password to \u201cnever expire\u201d. In the cloud we do not have this option.<\/p>\n<p>Of course, there are ways how to customize password expiration in Office 365. This can help you to create cloud only password policies. Let\u2019s first start with these settings in this article. After that, I will show you how to set accounts, so that the password will not expire.<\/p>\n<h4>Password policy<\/h4>\n<p>If we login to our Office 365 portal, we navigate to Settings > Security & Privacy.<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-1580\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/1-7.png\" alt=\"\" width=\"282\" height=\"598\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/1-7.png 282w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/1-7-141x300.png 141w\" sizes=\"(max-width: 282px) 100vw, 282px\" \/><\/p>\n<p>Now, you simply can choose the option Password policy:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1581\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/2-6.png\" alt=\"\" width=\"768\" height=\"209\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/2-6.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/2-6-300x82.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/2-6-600x163.png 600w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/p>\n<p>And here we have options to set our password policy.<\/p>\n<p>As you can see, we have the option to set the expiration date, the user notification counter and never expire option.<\/p>\n<p>Be aware of this never expire option. If you enable this setting, it will be for all user accounts you have in the cloud!<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-1583\" src=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-7.png\" alt=\"\" width=\"855\" height=\"480\" srcset=\"https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-7.png 855w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-7-300x168.png 300w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-7-768x431.png 768w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-7-600x337.png 600w, https:\/\/msb365.abstergo.ch\/wp-content\/uploads\/2018\/03\/3-7-780x438.png 780w\" sizes=\"(max-width: 855px) 100vw, 855px\" \/><\/p>\n<h4>Password expiration<\/h4>\n<p>What we want to do is, to make this never expire setting just for an Admin or service account.<\/p>\n<p>To do that we need to use the remote PowerShell.<\/p>\n<p>How to connect to your Office 365 Tenant by PowerShell you can see <a href=\"https:\/\/msb365.abstergo.ch\/?page_id=473\" target=\"_blank\" rel=\"noopener\">HERE<\/a>.<\/p>\n<p>After successful login, we can run the following command:<\/p>\n<pre>Set-MsolUser -UserPrincipalName ServiceAccount@Contoso.onmicrosoft.com -PasswordNeverExpires $true<\/pre>\n<p>I hope, this article helps you to optimize your cloud settings in Office 365 and your environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Having password policies in a company is good! Very good! And important! Using on-premises active directory and GPO\u2019s makes it very easy to handle password policies. If we have an Office 365 environment managed by Microsoft onboard tools such as ADFS and AAC we also don\u2019t have to think to far how to handle password [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3090,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[12,1923,3],"tags":[],"class_list":["post-1579","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","category-microsoft-365","category-powershell"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/1579","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1579"}],"version-history":[{"count":10,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/1579\/revisions"}],"predecessor-version":[{"id":5242,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/posts\/1579\/revisions\/5242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=\/wp\/v2\/media\/3090"}],"wp:attachment":[{"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1579"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1579"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.msb365.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1579"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}