简体   繁体   中英

PowerShell: Getting AADSTS500014 error while trying to connect to Exchange Online

PowerShell: Getting AADSTS500014 error while trying to connect to Exchange Online

$admin="admin@M365x121212.onmicrosoft.com"
$adminPassword="xxxxxxxxxxx" 
$cred = [Management.Automation.PSCredential]::new($admin, $(ConvertTo-SecureString -Force -AsPlainText -String $adminPassword))

Import-Module ExchangeOnlineManagement
Connect-ExchangeOnline -Credential $cred  -ShowProgress $true

New-ExoPSSession: AADSTS500014: The service principal for resource 'https://outlook.office365.com' is disabled. This indicate that a subscription within the tenant has lapsed, or that the administrator for this tenant has disabled the application, preventing tokens from being issued for it.

to resolve AADSTS500014 error:

  1. Log into portal office
  2. Select Azure Active Directory
  3. Select 'Enterprise applications' => 'Office 365 Exchange Online' => Properties
  4. Select "Enabled for users to sign-in" and click Save button

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM