Removing an AppRole from an Application’s manifest produces a 400 Bad Request with the error
Property value cannot be deleted unless it is disabled first.
When I set the isEnabled property to false and then hit save, I get a successful saven with a 200 OK looking at the browsers developer tools:
After reloading the Edit manifest screen the isEnabled
property is still true
and if you look at the PUT response in the browsers developer tools, it's coming back as true
there too.
How can I remove an appRole without having to delete and recreate the entire application?
Update
I've raised the following bug.
Until this gets fixed, there two options to work around this issue:
Using Azure AD PowerShell, you can disable and then remove the app role. Here's a sample script that would achieve this:
An alternative option is to user the Azure AD Graph Explorer and issue two
PATCH
requests on the Application object. The firstPATCH
request should set the app role'sisEnabled
attribute tofalse
. The secondPATCH
request can then remove the app role (i.e. include all existing app roles except the disabled one).It seems a bug in new portal . The save operation doesn't save
isEnabled
to false on server side . Any feedback , you could post to here .Currently , you could use Azure AD classic portal to modify the app roles in manifest(download the manifest and then upload manifest that changed) . Delete app roles in classic portal works fine in my environment . Please let me know if it helps.
This bug is fixed now. All you have to do is set
isEnabled
to false and save. Then you can delete the role and save again. A Work-around is not necessary.