Error while connecting to ExchangeOnline using powershell

Madhavi Joshi 1 Reputation point
2023-01-17T08:33:31.1033333+00:00

Facing this error:
Error occured: Error Acquiring Token: System.Exception: Case when Message contains:AADSTS70011 Invalid scope. The scope has to be of the form "https://resourceUrl/.default"Mitigation: change the scope to be as expectedAADSTS1002016: You are using TLS version 1.0, 1.1 anCase when Message contains:AADSTS70011 Invalid scope. The scope has to be of d/or 3DES cipher which are deprecated to improve the security posture of Azure AD. Your TenantID is: xxxx. Please refer to https://go.microsoft.com/fwlink/?linkid=2161187 and conduct needed actions to remediate the issue. For further questions, please contact your administrator.

Command executed: Connect-ExchangeOnline -AppId xxx -CertificateThumbprint xxx -Organization xxx

Module imported: exchangeonlinemanagement.3.1.0

Environment:

  • Azure Functions (function app)
  • Run time env: ~4
  • TLS 1.2

And I could able to connect for exchangeonlinemanagement.2.0.5 but not in 3.1.0

Any help regarding this would be highly helpful

Note: Tried executing [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12, still not helpful

Microsoft Exchange Online
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,566 questions
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,342 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Andy David - MVP 144.2K Reputation points MVP
    2023-01-17T13:05:34.9733333+00:00

    If everything is correctly set, I would send an email to the product owners and ask for assistance:

    [https://video2.skills-academy.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#report-bugs-and-issues-for-the-exchange-online-powershell-module

    User's image