Hi @Jacky Lam ,
Thanks for reaching out.
Yes, it is possible to add and remove entries in the single page application of app registration in AD using script.
You can refer the below scripts to add/ remove entries of application registration with az CLI commands.
https://github.com/microsoft/healthcare-apis-samples/blob/main/src/scripts/appregistrationcli.http
Reference: https://learn.microsoft.com/en-us/azure/healthcare-apis/register-application-cli-rest
You can also use the az rest command to add/ update and delete the applications
az rest --method post --uri https://graph.microsoft.com/v1.0/applications --headers "Content-Type=application/json" --body "{\"displayName\":\"webapi1\",\"signInAudience\":\"AzureADMyOrg\",\"web\":{\"redirectUris\":[\"https://jwt.ms\"]},\"requiredResourceAccess\":[{\"resourceAppId\":\"00000003-0000-0000-c000-000000000000\",\"resourceAccess\":[{\"id\":\"e1fe6dd8-ba31-4d61-89e7-88639da4683d\",\"type\":\"Scope\"}]}]}"
Reference: https://www.azurecitadel.com/rest-api/cli/
Hope this will help.
Thanks,
Shweta
Please remember to "Accept Answer" if answer helped you.