How to Unregister or Update Registered SharePoint app

20k views Asked by At

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.

5

There are 5 answers

1
Robin Güldenpfennig On BEST ANSWER

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.

0
Alberto S. On

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

Take a look ;)

0
iks On

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.

1
Ilya On

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

2
Santosha Epili On

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