Hi @rpodric ,
I understand that you are seeing the following audit log failure after granting admin consent:
Activity Type: Add app role assignment grant to user
Category: UserManagement
Status: failure
Status reason: Microsoft.Online.DirectoryServices.UniqueKeyPropertyException
User-Agent: EvoSTS
Usually this errors comes if we try to insert the duplicate records. To avoid this, we should avoid providing consent multiple times. Usually this occurs on the application side of things, and I would recommend reaching out to the app development team to get this resolved. I had a customer previously who faced the exact same error message when consenting to a different app, and the issue was resolved by the application vendor.
Here are a few additional things to try:
Review your permission classification to confirm which applications users can consent to, based on the app's requesting permissions
Verify that all of the permissions being requested from the application fall under "admin" and require admin consent
Capture a fiddler trace when reproducing the issue.
There was also a similar issue here where a user received the exact same error you are describing where the application developer hard coded text into the application's URL requiring admin consent ('&prompt=consent'), and the end user had to remove that code at the end of the URL. The user was able to use fiddler to capture the HTTPs traffic and confirm that the app was continuously requesting admin consent.
Let me know if this helps.
Thanks,
Marilee