Skip to content

[BUG] Connect-PnPOnline throws AADSTS7000218 with -Interactive and -ClientId #3364

@chscott

Description

@chscott

Notice

Many bugs reported are actually related to the PnP Framework which is used behind the scenes. Consider carefully where to report an issue:

  1. Are you using Invoke-PnPSiteTemplate or Get-PnPSiteTemplate? The issue is most likely related to the Provisioning Engine. The Provisioning engine is not located in the PowerShell repo. Please report the issue here: https://github.com/pnp/pnpframework/issues.
  2. Is the issue related to the cmdlet itself, its parameters, the syntax, or do you suspect it is the code of the cmdlet that is causing the issue? Then please continue reporting the issue in this repo.
  3. If you think that the functionality might be related to the underlying libraries that the cmdlet is calling (We realize that might be difficult to determine), please first double check the code of the cmdlet, which can be found here: https://github.com/pnp/powershell/tree/master/src/Commands. If related to the cmdlet, continue reporting the issue here, otherwise report the issue at https://github.com/pnp/pnpframework/issues

Reporting an Issue or Missing Feature

I try to log in like this:

Connect-PnPOnline -Url 'https://example-admin.sharepoint.com' -Interactive -LaunchBrowser -ClientId 'abc...'

Looks good in the browser:

image

I get this back in PowerShell:

Connect-PnPOnline: A configuration issue is preventing authentication - check the error message from the server for details. You can modify the configuration in the application registration portal. See https://aka.ms/msal-net-invalid-client for details.  Original exception: AADSTS7000218: The request body must contain the following parameter: 'client_assertion' or 'client_secret'.
Trace ID: b3eb08ce-ffa2-4391-a819-d5f9c8921a00
Correlation ID: 8cb2eedd-b4c1-498d-a13d-e8af282df189
Timestamp: 2023-08-25 14:32:14Z

Expected behavior

Please describe what output you expect to see from the PnP PowerShell Cmdlets

A successful login.

Actual behavior

Please describe what you see instead. Please provide samples of output or screenshots.

As above.

Steps to reproduce behavior

Please include complete script or code samples in-line or linked from gists

As above.

What is the version of the Cmdlet module you are running?

(you can retrieve this by executing Get-Module -Name "PnP.PowerShell" -ListAvailable)

2.2.55

Which operating system/environment are you running PnP PowerShell on?

  • Windows
  • Linux
  • MacOS
  • Azure Cloud Shell
  • Azure Functions
  • Other : please specify

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions