MC888036: Prevent/Fix: PnP PowerShell authentication failures

Announcement IDMC888036Published Date09-11-2024
ServiceGeneralLast Updated09-11-2024
CategoryPrevent or fix issuesExpiration Date12-31-2024
Roadmap IDAction Required by Date
TagsAdmin impact, User impact


Summary
                Recent changes to PnP PowerShell are causing authentication failures. Users experiencing errors with the PnP Management Shell app must create their own Entra application. Resolution involves updating PnP PowerShell, creating an Entra application, and setting an environment variable with the application ID. PnP PowerShell is community-supported, not officially by Microsoft.


More Information

PnP PowerShell is a community provided open-source tool which does not have direct support from Microsoft.

Microsoft 365 customers have provided feedback that a recent change with PnP PowerShell is impacting their scripts.

Although PnP PowerShell is not directly supported by Microsoft, we are providing this information in an effort to help customers address the change.

If you are authenticating your PnP PowerShell sessions and seeing below error, then you are using the PnP Management Shell app (id = 31359c7f-bd7e-475c-86db-fdb8c937548e) and you will need to set up your own Entra application in your own tenant.

Message: AADSTS700016: Application with identifier '31359c7f-bd7e-475c-86db-fdb8c937548e' was not

found in the directory 'The companyname'.

This can happen if the application has not been installed by the administrator

of the tenant or consented to by any user in the tenant.

You may have sent your authentication request to the wrong tenant.

Resolution steps

  1. Ensure you're using the latest PnP PowerShell version
  2. Create your own Entra application and assign it the minimal permissions that you would require. This can be done using PnP PowerShell or manually in Entra admin center
  3. Add an environment variable named ENTRAID_APP_ID with as value the application id of the application created in previous step

Note that PnP PowerShell is a community powered open-source solution which does not receive official support from Microsoft. The community behind this project is providing best effort support via the issue list and discussion forum in the PnP PowerShell GitHub repository.

Previous Post Next Post