sharepoint-apps

How to Unregister or Update Registered SharePoint app


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.


Solution

  • 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.