pnp / PnP-PowerShell

SharePoint PnP PowerShell CmdLets
https://pnp.github.io/powershell
Other
987 stars 665 forks source link

Connect-PnPOnline -AppId -AppSecret -AADDomain Not working #2638

Closed rramhapgb closed 4 years ago

rramhapgb commented 4 years ago

Reporting an Issue or Missing Feature

Issue. Worked in 3.19.2003, but not in 3.20.2004.0

Expected behavior

Successful login with subsequent Get-PnPAccessToken to work in release 3.20.2004. Works when revert to 3.19.2003

Actual behavior

Connect-PnPOnline -AppId $appid -AppSecret $appsecret -AADDomain $appaaddomain

Previous line does not result in error, but connection is not successful. Subsequent dependent line fails.

Get-PnPAccessToken : No Azure AD connection/Access Token. Please connect first with Connect-PnPOnline -Url [url] -ClientId [clientid] -CertificatePath [path] -Tenant        
[tenant], Connect-PnPOnline -Graph, Connect-PnPOnline -Scopes or Connect-PnPOnline -AppId -AppSecret -AADDomain
At C:\Work\gbautomation\Get-YammerReports.ps1:43 char:10
+ $token = Get-PnPAccessToken
+          ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ConnectionError: (:) [Get-PnPAccessToken], InvalidOperationException
    + FullyQualifiedErrorId : NO_OAUTH_TOKEN,SharePointPnP.PowerShell.Commands.Base.GetPnPAccessToken

Steps to reproduce behavior

Connect-PnPOnline -AppId $appid -AppSecret $appsecret -AADDomain $appaaddomain
$token = Get-PnPAccessToken

Which version of the PnP-PowerShell Cmdlets are you using?

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

3.20.2004.0

How did you install the PnP-PowerShell Cmdlets?

ghost commented 4 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

fastlaneb commented 4 years ago

Hi @rramhapgb Confirmed, I'm seeing the same thing. Looks like we're throwing "The pipeline has been stopped." I may have a chance to dig deeper next week.

samculver commented 4 years ago

I am also seeing the same thing. Also with other following commands: Connect-PnPOnline -AppId $AppId -AppSecret $appSecret -AADDomain $AADDomain Get-PnPUnifiedGroup -Identity $Alias

rramhapgb commented 4 years ago

Yes, this is understood. This worked one day understood previous build, then failed on next run after updating. Credentials were validated in AAD before I reported the issue.


From: Kunj Balkrishna Sangani notifications@github.com Sent: Saturday, April 18, 2020 1:35:04 AM To: pnp/PnP-PowerShell PnP-PowerShell@noreply.github.com Cc: Rick Ramhap Rick.Ramhap@grupobimbo.com; Mention mention@noreply.github.com Subject: Re: [pnp/PnP-PowerShell] Connect-PnPOnline -AppId -AppSecret -AADDomain Not working (#2638)

CAUTION [EXTERNAL]

The AppId and AppSecret you are using Should be Azure AD Registered Application Steps to Register application

  1. go to portal.azure.com
  2. Select Azure Active Directory
  3. got to App registration

Here either you can use and Existing App which is registered or create a new and use those for the credentials

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pnp/PnP-PowerShell/issues/2638#issuecomment-615571891, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADHFDTAFWXGDE42QCV3HHYTRNE3YRANCNFSM4MK2QRTQ.


Aviso de Privacidad y Confidencialidad // Privacy and Confidentiality Notice // Avis de confidentialité: https://privacy.grupobimbo.com/

KoenZomers commented 4 years ago

This has been fixed already in PR #2624. It will be fixed in the May 2020 release. Can you wait for this release or is this now causing a blocking situation for you?

rramhapgb commented 4 years ago

I can wait. I appreciate the fix!

From: Koen Zomers notifications@github.com Sent: Sunday, April 19, 2020 7:08 PM To: pnp/PnP-PowerShell PnP-PowerShell@noreply.github.com Cc: Rick Ramhap Rick.Ramhap@grupobimbo.com; Mention mention@noreply.github.com Subject: Re: [pnp/PnP-PowerShell] Connect-PnPOnline -AppId -AppSecret -AADDomain Not working (#2638)

CAUTION [EXTERNAL]

This has been fixed already in PR #2624https://github.com/pnp/PnP-PowerShell/pull/2624. It will be fixed in the May 2020 release. Can you wait for this release or is this now causing a blocking situation for you?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/pnp/PnP-PowerShell/issues/2638#issuecomment-616240805, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADHFDTGEEVW6KC3VAK2P5RLRNN75LANCNFSM4MK2QRTQ.


Aviso de Privacidad y Confidencialidad // Privacy and Confidentiality Notice // Avis de confidentialité: https://privacy.grupobimbo.com/

RonRohlfs commented 4 years ago

I am also seeing the same issue. This is a blocking issue for us. However, if "It will be fixed in the May 2020 release" means within the next two weeks, then we can wait.

KoenZomers commented 4 years ago

For now, please revert to using the March 2020 release if this is blocking for you. I'm expecting the May release to occur around May 10th, 2020.

KoenZomers commented 4 years ago

Apologies, but the release of the fix has been delayed. It will be released with the June 2020 release taking place on June 9th, 2020. Closing this issue for now. If the issue persists with the June 2020 release, feel free to reopen this issue.