Overlapping identities - PREVIOUSLY_AWARDED error on a unique email (API)

Jump to solution
AlekWO_auticon
Community Member

I want to issue badges to two different people, let's say, Jean-Marie Smith and Marie Smith.

After successfully issuing an assertion for Jean-Marie with the email identity (jeanmarie.smith@company.com)

I try to issue a badge for marie.smith@company.com

using the API POST /v2/badgeclasses/{class}/assertions
{"recipient": {"type": "email", "hashed": false, "identity": "marie.smith@company.com"}, "narrative": "Completed the course", "issuedOn": "2024-06-07", "allowDuplicateAwards": false}

And I get an error:

'validationErrors': ['A previous award of this badge already exists for this recipient.'],
'errorCode': 'PREVIOUSLY_AWARDED'

However there is no badge for marie.smith@company.com, when I search in the user interface or through the API using endpoint /v2/badgeclasses/{class}/assertions?include_expired=false&include_revoked=false&recipient=marie.smith%40company.com

the search doesn't return any badges.

It seems that the system incorrectly uses CONTAINS instead of EQUALS for the identity condition when searching for existing badges to validate if there are duplicates.

 

Labels (3)
1 Solution
cstrikwerda
Instructure
Instructure

Hello @AlekWO_auticon 

Thanks for posting in the Community!

We have opened an engineering ticket regarding this behavior you are seeing.

We would be glad to update you with any new information once it becomes available via the internal support ticket we have in your name.

All the best,

View solution in original post

0 Likes