Setting the Administrator's Password to "Never Expire"
To perform this instruction, you must have a Windows client or server machine with Azure Active Directory PowerShell module Version 2 installed. You can use the same machine as it was used in the Configuring a Pre-consent for a Registered Application section.
For Microsoft Cloud, perform the following steps:
- Log on to the Windows machine as Administrator.
- Run Windows PowerShell.
- Run the following cmdlet to connect to the Azure Active Directory:
Connect-AzureAD -AzureEnvironment "AzureGermanyCloud"
and type your administrative credentials in an opened pop-up window.
- Run the command:
Get-AzureADUser -Filter "userPrincipalName eq 'oa_account@<partnersubdomain>.onmicrosoft.de'"
and ensure that you receive only user:
ObjectId DisplayName UserPrincipalName UserType
-------- ----------- ----------------- --------
11111111 Demo Name Set oa_account@<partnersubdomain>.onmicrosoft.de Member
- Set the password to never expire:
Get-AzureADUser -Filter "userPrincipalName eq 'oa_account@<partnersubdomain>.onmicrosoft.de'" | Set-AzureADUser -PasswordPolicies DisablePasswordExpiration
Important: If your security policies do not allow setting passwords to never expire, you must regularly set a new admin user password in the Microsoft cloud and the global settings of the application instance before the old admin user password expires.
For Microsoft Cloud Germany, perform the steps below:
- Log on to the Windows machine as Administrator.
- Run Windows PowerShell.
- Run the following cmdlet to connect to the Azure Active Directory:
Connect-AzureAD -AzureEnvironment "AzureGermanyCloud"
and type your administrative credentials in an opened pop-up window.
- Run the command:
Get-AzureADUser -Filter "userPrincipalName eq 'oa_account@<partnersubdomain>.onmicrosoft.de'"
and ensure that you receive only user:
ObjectId DisplayName UserPrincipalName UserType -------- ----------- ----------------- -------- 11111111 Demo Name Set oa_account@<partnersubdomain>.onmicrosoft.de Member
- Set the password to never expire:
Get-AzureADUser -Filter "userPrincipalName eq 'oa_account@<partnersubdomain>.onmicrosoft.de'" | Set-AzureADUser -PasswordPolicies DisablePasswordExpiration
: If your security policies do not allow setting passwords to never expire, you must regularly set a new admin user password in the Microsoft cloud and the global settings of the application instance before the old admin user password expires.