A cloud-based identity and access management service for securing user authentication and resource access
Hello Stephen Patterson,
Greetings! Thanks for raising this question in the Q&A forum
Error AADSTS530035 means BlockedBySecurityDefaults. The Microsoft Teams PowerShell authentication flow is being blocked by the tenant’s Microsoft Entra Security Defaults, commonly because an older credential-based or device-code flow is being used.
Update the Teams PowerShell module
Close existing PowerShell sessions, open a new elevated session, and run:
Update-Module MicrosoftTeams
If the module is not installed:
Install-Module MicrosoftTeams -Force -AllowClobber
Microsoft supports Windows PowerShell 5.1 and PowerShell 7.2 or later. See Install Microsoft Teams PowerShell.
Use interactive modern authentication
Connect without supplying credentials or requesting device authentication:
Connect-MicrosoftTeams
Complete the interactive sign-in and MFA prompt. Avoid -Credential with an older module and avoid -UseDeviceAuthentication. Security Defaults currently blocks device-code flow as well as legacy authentication. See Microsoft Entra Security Defaults.
Locate the exact blocked sign-in
In the Microsoft Entra admin center, navigate to Entra ID > Monitoring & health > Sign-in logs and search using:
Correlation ID: d17e98e7-60d5-4d09-b3b1-da37ef2bb2cf
Request ID: `28c4331c-c4d5-49d1-9cf7-91d0d3bc0300`
Timestamp: `2026-09-04T18:06:00.807Z`
Application ID: `12128f48-ec9e-42f0-b203-ea49fb6af367`
Open the event and inspect **Authentication Details** and the authentication protocol. The failure reason should show `BlockedBySecurityDefaults`. Microsoft documents this investigation process in [Troubleshoot sign-in problems](https://learn.microsoft.com/en-us/entra/identity/conditional-access/troubleshoot-conditional-access).
**Use certificate authentication for unattended scripts**
Interactive user authentication is appropriate for administration from a console. For scheduled or unattended automation, register an application, grant only the required permissions with administrator consent, upload a certificate, and connect using:
```powershell
Connect-MicrosoftTeams `
-CertificateThumbprint "<certificate-thumbprint>" `
-ApplicationId "<application-id>" `
-TenantId "<tenant-id>"
```
Confirm that the commands used by the script support application authentication. See [Application-based authentication in Teams PowerShell](https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-application-authentication).
**Keep Security Defaults enabled**
Security Defaults does not support per-user or per-application exclusions. Do not disable it merely to run Teams PowerShell. If the organization has Microsoft Entra ID P1 or P2 and requires customized authentication policies, first design equivalent Conditional Access protections for MFA, administrator access, legacy authentication, and device-code flow before replacing Security Defaults.
**Escalate if interactive authentication is also blocked**
If the current module still returns `530035` when using plain `Connect-MicrosoftTeams`, open a Microsoft Entra support request and include the request ID, correlation ID, UTC timestamp, application ID, module version from `Get-Module MicrosoftTeams -ListAvailable`, and the sign-in-log authentication details. Do not include the user’s IP address or device identifier in the public thread.
If this answer helps you kindly accept the answer which will help others who have similar questions.
Best Regards,
Jerald Felix.