-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] PnP Framework still using PnP Management Shell for authentication #1059
Comments
Can confirm, authentication is now broken with the following error: |
Hi, you will need to provide an alternative service principal since the app PnP Management Shell has been removed: https://pnp.github.io/powershell/articles/registerapplication.html |
We had the same problem as @siimav mentioned and solved it as follows:
As the PnP Management Shell Client ID '31359c7f-bd7e-475c-86db-fdb8c937548e' has been removed, it should no longer be used and this approach wit the fallback should be changed. |
Did you grant SharePoint using Delegated or Application permissions? I followed the steps in the reference link for setting up the App Registration for Delegated but got this error message: Microsoft.Identity.Client.MsalServiceException: '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'. |
I was not involved in the granting of the rights myself, but I know that the permissions are as follows: At the beginning we had forgotten the upper red marked rights and had the following error message:
|
Thanks! I assume you are using this code in background processes (like an Azure Function, etc). Based on the link you previously reference... This is all I have configured in my App Registration. Do I need some of the other items shown in your App Registration along with what is in the Red Box to make that AuthenticationManager method work? |
You are welcome! Yes exactly, we have various Azure Functions in use that use the app registration. We have assigned all the permissions that are in the screenshot, including those outside the red box (I only have this screenshot and don't have access to it myself). |
Hi, I just had the same issue, make sure that this check is turned on: |
The fallback was removed with this commit, can this issue be closed? It is currently on the dev branch, when will it be released? |
Hello Team,
As we know that PnP Management Shell is getting deprecated on 9th September, Does it only affect the PnP PowerShell alone?
Have noticed in one of the Authentication methods,
var authManager = new PnP.Framework.AuthenticationManager(_Username, securePassword);
And this internally uses PnP Management Shell multi-tenant Azure AD application ID to authenticate.
##Findings
pnpframework/src/lib/PnP.Framework/AuthenticationManager.cs
Line 94 in e18fad1
Above line might be using PnP PowerShell Client ID,
pnpframework/src/lib/PnP.Framework/AuthenticationManager.cs
Line 389 in e18fad1
Clearly says "Creates a new instance of the Authentication Manager to acquire authenticated ClientContexts. It uses the PnP Management Shell multi-tenant Azure AD application ID to authenticate. By default tokens will be cached in memory."
This was not addressed so far, does it mean that, this authentication methods should not be used anymore?
Thanks,
Nishkalank Bezawada
The text was updated successfully, but these errors were encountered: