PnP Management Shell EntraID app is deleted : what should I do ? #4249
Replies: 26 comments 79 replies
-
We already have an application registered in Entra ID. How does this apply for Azure Automation implementation? There's no way to set a environmental variable. |
Beta Was this translation helpful? Give feedback.
-
we are using pnp.powershell version 1.12.0 for various reasons... Will an own Entra App ID also work with this version? |
Beta Was this translation helpful? Give feedback.
-
We use 1.12 as well - using PowerShell 7.x is not an option for us at this time. Until yesterday we were using app only credentials flow (service account with password) with Connect-PnPOnline. Changing it to -ClientId / -CertificatePath / -CertificatePassword worked for us. This change still caused a massive amount of stress for us, and we were lucky to learn about it before it actually happened. |
Beta Was this translation helpful? Give feedback.
-
I have to say that this was a quite a big change and quite unexpected - even though it has been stated for a while - it wasn't really emphasised. You can get around this change (with limited functionality) by using the old method: Connect-PnPOnline -Url https://tenant.sharepoint.com -UseWebLogin || You will get a warning but you can still log in - only thing is that you won't be able to use the Microsoft Graph related commandlets, which may be good enough for those working in organisations where they have to wait for a global admin to setup the new App ID. |
Beta Was this translation helpful? Give feedback.
-
Such a ridiculously impulsive change... There are plenty of things App Registration can't do, especially in multi-geo. We had virtually all, say for a few things, running as app registration pre this change. I am not impressed |
Beta Was this translation helpful? Give feedback.
-
Hello, Unfortunatelly we did not know of this change until now and several scripts are affected right now. However we are facing issues with the permissions right now as the documentation of the permissions is very lackluster. We are able to connect with pnp but we have issues with the following commands: Get-PnPFolder We are getting the following error: Right now we have the following permissions in place for the application: Also we need to find the right permissions for the following command: Can you please help us sort this out as we are currently running out of ideas. |
Beta Was this translation helpful? Give feedback.
-
This all talks about Powershell and M365 CLI, but I am impacted using the PnP Framework in C# code, and there is no guidance whatsoever on how I address this issue in my code!
Throws the exception on the GetContext() call. |
Beta Was this translation helpful? Give feedback.
-
Hi, i cant create noninteractive app registration. $result = Register-PnPEntraIDApp -ApplicationName "PnP Rocks" -Tenant [yourtenant].onmicrosoft.com -OutPath c:\mycertificates -DeviceLogin After default permissions will be use nothing is happening. Its possible set up app in entra manually like for interactive login? |
Beta Was this translation helpful? Give feedback.
-
We used the PnP Management Shell application to grab template data and site scripts from the environment in order to create standardized sites programmatically. I'm now getting this error when trying to run Get-pnpSiteScriptFromWeb: Get-pnpSiteScriptFromWeb : Unable to connect to the SharePoint Online Admin Center at 'https://xx-admin.sharepoint.com' to run this cmdlet. Please ensure you pass in the I've followed the instructions for creating the new App Registration and added the AllSites.FullControl permissions. Are further permissions/steps required? Edit: I was able to get past the SharePoint Online Admin Center error by supplying the admin center URL to the "TenantAdminUrl" parameter. Now I just get the "app principal does not exist" message for the site I'm trying to pull the script from. |
Beta Was this translation helpful? Give feedback.
-
We are using PnP Core SDK (1.14 latest) in our .NET solution and we started facing the same issue
Then we created a new EntraID application and it started working with PnP PowerShell but we still get an error in our .NET solution (but different error AADSTS7000218), here is the code snippet that is used in .NET solution. Code referred: https://pnp.github.io/pnpcore/api/PnP.Core.Auth.UsernamePasswordAuthenticationProvider.html
below is the error that we get,
Does anyone have a solution for this? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
-
I’m getting the same issue, when connect using -Credentials with user having SharePoint Administrator role, for running New-PnPSite, please advice what is the equivalent permissions on Entra ID app? |
Beta Was this translation helpful? Give feedback.
-
I understand why this change happened, but in the future, if making such a breaking change, I would suggest providing much more advanced notice and louder communication. I was not aware that we needed to be monitoring the PnP blog for breaking changes that could happen even if we do not upgrade the module version. One example of a better way to handle:
To just shut it down so suddenly and quietly is horrible for the community. We now have hundreds of scripts that broke and need to be updated and tested. |
Beta Was this translation helpful? Give feedback.
-
Can someone help... so how do you determine which api permissions you need to setup now? For e.g. Grant-PnPAzureADAppSitePermission is now access denied when I authenticate with single tenant app reg, I placed sites full control app and delegated and graph api, what else must be placed, how to determine that in future? |
Beta Was this translation helpful? Give feedback.
-
I got the issue yesterday, now i'm able to connect throught the new AzureApp that i have created. Get-PnpList -identity $ListName | Get-PnpListItem -pagesize 5000 when i use the Get-Pnplist command it return me the sharepoint site with no probelm, but when i add the Get-PnpListItem nothing work and i dont have any return ... is someone experiencing something similar ? (with the previous version i didnt had any problem) |
Beta Was this translation helpful? Give feedback.
-
We are now randomly getting error AADSTS700024 during non-interactive app-only certificate authentication in Connect-PnPOnline. Any idea why this may be happening and how to address this? Here's a sample error dump: MSAL.Desktop.4.36.1.0.MsalServiceException: |
Beta Was this translation helpful? Give feedback.
-
Hi, We have a project that uses a username/password to connect in a C# Azure Function with PnP.Framework 1.11. As expected, it stopped working when the App Entra ID of PnP Management Shell was deleted. We reused an Entra ID app of the Azure Function used in the project and configured it to work with the correct API authorization. I have tested it with PnP.PowerShell. Via PnP.PowerShell, we are able to connect, create a SharePoint site, and delete it when we specify the Client ID, username and password in the PnPConnect in Interactive mode. Moving back to the main projet, in pnpFramework 1.11. The authentification code that we are using is: private async Task Get(string sourceTemplateSiteUrl) var authManager = new PnP.Framework.AuthenticationManager(_connectionString.SharePointTeamsSiteUserName, pwd); [...removed...] We try the alterne authentication methode AuthenticationManager(ClientAppID, _connectionString.SharePointTeamsSiteUserName, pwd) And we also tested the alternate methode: PnP.Framework.AuthenticationManager.CreateWithCredentials(ClientAppID, _connectionString.SharePointTeamsSiteUserName, pwd) We also update the pnpFramework to the latest version 1.17. All our tests are giving us this erreur message when we try to connect. 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'. We look at the configuration on the EntraID App without success. This is a bug for us that is blocking our work in production. Thanks for the help |
Beta Was this translation helpful? Give feedback.
-
@gautamdsheth I have been loading creds for a service account from a password management DB and then passing them with "-Credentials". Which approach do you suggest I should I now use if this is no longer going to be supported? These are being ran using an automated server, so browser authentication is not possible. |
Beta Was this translation helpful? Give feedback.
-
I have a node version 16.14.2 and package pnp/cli-microsoft365:6.8.0 that is using m365 in a script to download a file. Do I need to upgrade to v9 or simply re-registering will work? |
Beta Was this translation helpful? Give feedback.
-
Does PNP still support connecting to an On Prem instance of SharePoint for the conversion of Classic Pages to Modern Pages in a migration to a SharePoint Online Tennant? Our connections to the On Prem environment failed on 9/9 and documentation I have seen have only given examples of connecting to a SharePoint tennant URL but not a URL that is On Prem. |
Beta Was this translation helpful? Give feedback.
-
We changed to use an app registration to log in with a certificate. It works on other commands (such as new-pnpsite), but when running the command Add-PnPMicrosoft365GroupToSite, it returns "An error occurred while processing this request." PLEASE HELP !!! this is urgent |
Beta Was this translation helpful? Give feedback.
-
Hello. We have granted Group.ReadWrite.All and Directory.Read.All.
Despite this, it seems we are still missing some necessary permissions. Could you please let us know the permissions required for Get-PnPTeamsTeam and Get-PnPTeamsUser to function properly? Thank you. |
Beta Was this translation helpful? Give feedback.
-
Hi! We have various Sharepoint scripts running for reporting. Since the change, for example, the following part no longer works: ForEach($Library in $DocumentLibraries) The last command (with ", Member") simply returns nothing, no error, no result. Without the ", Member" (what i need of course) i get the output below. The AppReg rights are already set to Directory.Read.All. The output for one roleAssignment ist just the following: Member : Microsoft.SharePoint.Client.User Does anyone have any ideas please? Manuel |
Beta Was this translation helpful? Give feedback.
-
Well, took me 4 weeks to get this fixed, but finally did. I had 2 problems that complicated things. In a large enterprise organization, getting someone to do the Admin Consent took 3 weeks. First finding out who was even the correct people to ask, then going through the rigamarole to get them to actually do it after they asked a ton of questions, and they aren't the most responsive so it several days between their responses. It was also confusing because we're only using Delegate permissions (no "Application" permissions) and everywhere I read said that admin consent wasn't needed for Delegate permissions, but apparently in our tenant, admin consent is still needed even for Delegate permissions. Lastly, we authenticate with a user account and kept getting error messages about a missing "client_assertion" or something like that. Finally discovered that in the App Registration config, under Authentication, Advanced Settings, we needed to set "Allow public client flows" to Yes. |
Beta Was this translation helpful? Give feedback.
-
What is the alternative if registering an app is not an option due to security restrictions? |
Beta Was this translation helpful? Give feedback.
-
Two week ago, I registered New App in Entra ID to access SPO by using PnP Powershell. And, from now on, When I want to check the imformation about the Update of PnP Powershell, |
Beta Was this translation helpful? Give feedback.
-
1 month ago approx. i could make a new app registration and connect via the following command to set the "Read" permissions to a specific site. Now i am not able anymore.
Error i now get: Can anyone help? |
Beta Was this translation helpful? Give feedback.
-
As part of a focus on improving the security posture, the multi-tenant PnP Management Shell EntraID app has been deleted.
You can read more about this announcement here:
https://pnp.github.io/blog/post/changes-pnp-management-shell-registration/
I am getting this error
Who does it impact ?
This impacts every code/script which depends on this EntraID app. It had Client/Application ID:
This impacts the credentials flow (user name + password, get-credentials ), interactive flow (-Interactive) as well as device login flow (-DeviceLogin), if it depended on the PnP app.
I am using Client ID + Certificate, Managed Identity , my own Entra ID App, legacy ACS (ClientID + Secret) or some other way to authenticate using PnP
Then, you are not impacted by this change. No need to change anything. Your scripts should continue to work as is. If you run into any issue, please create one in the issue list and we will look into it.
What is the easiest/fastest way to get my scripts back up & running with minimal changes?
Create your own Entra ID app and assign it the minimal permissions that you would require.
Add an environment variable
ENTRAID_APP_ID
orENTRAID_CLIENT_ID
like this at the top or before the beginning of your PnP PowerShell scripts (i.e before Connect-PnPOnline)or
Ensure that you are using the latest version of PnP PowerShell.
The latest update will pick up the value from the environment variable and use it.
More information & guidance: https://pnp.github.io/powershell/articles/defaultclientid.html
How do I create an Entra ID app ?
Manual steps: https://pnp.github.io/powershell/articles/registerapplication.html#manually-create-an-app-registration-for-interactive-login
Interactive steps:
https://pnp.github.io/powershell/articles/registerapplication.html#automatically-create-an-app-registration-for-interactive-login
How do I determine which permissions I should assign for my scripts ?
You can read about it here:
https://pnp.github.io/powershell/articles/determinepermissions.html
I have an existing Entra ID app. Can I use it ?
Yes absolutely, just set the value of its ClientID in an environment variable and ensure that you are using the latest version of PnP PowerShell.
My org only allows FIDO keys, Conditional access policy , Windows Hello or other secure auth mode
PnP PowerShell 2.12 and later versions now support authentication using these native secure mode of authentication.
More info about it here:
https://pnp.github.io/powershell/cmdlets/Connect-PnPOnline.html#example-18
https://pnp.github.io/powershell/cmdlets/Connect-PnPOnline.html#-oslogin
https://pnp.github.io/powershell/articles/authentication.html#authenticating-using-web-account-manager
Feel free to ask any question that you may have about this change.
Apologies for such a short notice on this abrupt change, unfortunately we can't extend or undo this.
Beta Was this translation helpful? Give feedback.
All reactions