6

I have an App to be used in my SharePoint tenant. From App developer I got the Client ID, Client Secret, App domain, return Url.

During my app registration through Appregnew.aspx, I have used wrong return url, and client secret. Now if I click on that app, it throws me error "An error occurred....".

To Use that App, I need to update my registered App with my correct client secret and return url. I am not finding any way .. How to Update or Unregister the SharePoint App.

user2768967
  • 367
  • 1
  • 4
  • 18
  • this enables you to view the site collection apps in a list form https://**.sharepoint.com/sites/[sitename]/_layouts/15/appprincipals.aspx – Sundara Prabu May 15 '19 at 12:22

5 Answers5

7

To get your app registration details use below link

{SiteUrl}/_layouts/15/appinv.aspx

Then update your details using below link with existing Client ID(do not use generate client ID and client secret)

{SiteUrl}/_layouts/15/appregnew.aspx

This will update your app registration details for existing client ID.

Use link for more details https://msdn.microsoft.com/en-us/library/office/jj687469.aspx

Santosha Epili
  • 317
  • 2
  • 6
5

Not official/documented way but it works for me for SharePoint Online

1) I have installed Azure AD PS

2) Then run the following PS script Connect-MsolService $appPrincipal = Get-MsolServicePrincipal -ServicePrincipalName client_id Remove-MsolServicePrincipal -ObjectId $appPrincipal.ObjectId

3) Then go to {SiteUrl}/_layouts/15/appinv.aspx and try lookup app by client_id. You can get Unexpected error or no info(like new id)

4) Then go to {SiteUrl}/_layouts/15/appregnew.aspx and register app again with same client id

Ilya
  • 436
  • 4
  • 15
1

Install the AzureAD PowerShell module.

Then run the following commands to remove your registered SharePoint app:

Connect-AzureAD
$app = Get-AzureADServicePrincipal | Where-Object {$_.AppId -eq "your client ID"}
Remove-AzureADServicePrincipal -ObjectId $app.ObjectId

After that you can follow the instructions in Santosha Epilis answer.

  • Here is also an exaplanation about how to do it from the graphical interface https://sharepoint.stackexchange.com/questions/198926/delete-registered-app-in-sharepoint – Alberto S. Apr 17 '20 at 18:00
0

I have found the solution as well, for doing the same task but through the azure portal

Take a look ;)

Alberto S.
  • 1,805
  • 23
  • 39
0

This worked for me: Install-Module MSOnline Connect-MsolService $appPrincipal = Get-MsolServicePrincipal -ServicePrincipalName client_id Remove-MsolServicePrincipal -AppPrincipalId $appPrincipal.AppPrincipalId

Or, you will need to go to your Azure AD portal. Click on the Azure Active Directory portal. Search for the Enterprise Applications => All applications (remove all filters) Filter by All applications and by your Shp App Id.

iks
  • 1