Office365 outlook keep asking for password

Office365 outlook keep asking for password

 

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Common\Identity]
"DisableADALatopWAMOverride"=dword:00000001

 

sources:https://community.spiceworks.com/topic/2025536-outlook-2016-365-keeps-asking-for-credentials?page=5 , https://support.microsoft.com/en-us/help/4025962/can-t-sign-in-after-update-to-office-2016-build-16-0-7967-on-windows-1

Office 365 Azure AD Connect assigning .onmicrosoft.com to synced users

When Azure AD Connect it configure to sync ad account to Azure AD/Office 365 it assigns the login name as the AD UPN (as expected), but it won’t assign that same UPN as the default email address – instead it assign a @mydomain.onmicrosoft.com as the primary email address.

to correct this we can use the Synchronization rules editor, which is installed together with the Azure AD Connect (Download Link)

In Synchronization rules editor, switch the direction tabs to outbound rules.
select the rule called “Out to ADD – UserExchangeOnline”, click edit and accept the option to disable and clone the rule (this will create a rule called ““Out to ADD – UserExchangeOnline – Cloned” that can be modified.

Change the precedence to 50

go to transformations, and Scroll down till you find the “Target Attribute” of “ProxyAddresses”
Change the FlowType to “Expressions” and enter the following in the source:

"SMTP:" & [userPrincipalName]

Now resync the users and the primary email address should be changed

Sources: https://rscc.co.uk/solution-office-365-assigning-onmicrosoft-com-addresses-used-aad-connect/

Remove password expiration Office 365

Remove password expiration Office 365

I wrote this powershell script to remove password expiration for all users, so that the users password not expires

Password_expiration.ps1

$Cred = Get-Credential

Read-Host 'Press Enter to continue to Connect to Office 365' | Out-Null
Write-Host "Continueing..."
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection

Import-PSSession $s

Read-Host 'Press Enter to continue to remove password from expires for all users' | Out-Null
Write-Host "Continueing..."
Connect-MsolService –Credential $cred

Get-MSOLUser | Set-MsolUser -PasswordNeverExpires $true

Read-Host 'Press Enter to exit script, All Done' | Out-Null

Change Retention Policy – Office 365

Change Retention Policy – Office 365

I wrote this powershell script to remove the Retention Policy that delete all emails in Users Deleted Items folder that are older then 30 days

Retention_Policy.ps1

$Cred = Get-Credential

Read-Host 'Press Enter to continue to Connect to Office 365' | Out-Null
Write-Host "Continueing..."
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection

Import-PSSession $s

Read-Host 'Press Enter to continue to Remove 30 days Deleted Items rule' | Out-Null
Write-Host "Continueing..."
Enable-OrganizationCustomization

Set-RetentionPolicyTag "Deleted Items" -RetentionEnabled $false

Read-Host 'Press Enter to exit script, All Done' | Out-Null

Create office 365 mail relay connector

Create office 365 mail relay connector

go to https://outlook.office365.com/ecp/ login as global administrator

step 1: click Mailflow
step 2: click Connectors
step 3: click Add

Office365AddRelayConnector1

step 4: Give the connector a name (eg. AllowRelay)
step 5: Select On-Premise
step 6: Select Restrict domains by IP addresses
step 7: Set sender domain to *
step 8: Set sender ip to your own Wan ip/public ip (Only static ips is allowed)
step 9: Set Accepted domains to your office 365 domain

Office365AddRelayConnector2

now you can use your own mx record eg. youdomain-com.mail.protection.outlook.com as relay server/smarthost without login, and on port 25
Source: http://technet.microsoft.com/en-us/library/dn554323.aspx