API management (admin) - [Version]:16.0.0.8901 - Another object with the same value for property identifierUris already exists.
Hi,
Category
- [x] Question
- [ ] Typo
- [x] Bug
- [ ] Additional article idea
Expected or Desired Behavior
After creating a SPFx solution that needs to access Microsoft Graph, I wanted to go to admin portal to approve permissions
Observed Behavior
I initially had something similar to #3823 (permission entry already exist), but then I got something different with no clue how to fix it
error: {code: "-1, Microsoft.SharePoint.Client.UnknownError", message: "Unknown Error"}
I get the following messages on the central admin page

And I can't see any of the app permission requests that are supposed to appear with my SPFx packages...
Steps to Reproduce
Whatever I can try now I always get this unknown error message on the app permissions page
Could you please help with this ?
Regards, Yannick
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
We are having the same issue since a few days.
Before we did have the Error "Another object with the same value for property identifierUris already exists."

Exactly @mirkori , I'm more confident since I'm not alone :D
Actually I got the "Unknown Error" because I tried to remove multiple entries in the Azure AD after I saw this message.
I restored them using the AzureAD Powershell and now I get back the same message

I checked on another brand new developer tenant and I get exactly the same issue
Same issue here. Also is weird that I´m seeing 2 Azure Ad Apps registered as "SharePoint Online Client Extensibility Web Application Principal"
I see it 6 times

Actually my SPFx app specifies 3 permission requests, and I deployed it two times... I really suspect it is related to that...
Seems so! I always thought there should be only one App registered that way for all the spfx solutions using aadHttpClient...
It looks like it is what the error message says somehow...
I edited the title since the real issue is really this one...
Can confirm same issue on multiple tenants.
Exactly the same issue on my two dev tenant and my prod tenant

Same issue.

My workaround was to view the console when running my SPFx webpart and found out what clientId it was trying to call. Then deleted all the duplicates except the one that my webpart was actually using. Waited about 15 min and i got it working.
Have the same issue - resulting in my webparts throwing the error
Error: To view the information on this page, ask a global or SharePoint admin in your organization to go to the API management page in the new SharePoint admin center.
@spdavid Thank you very much that workaround is working! Anyway the underlying issue still exists.
@spdavid @mirkori where do you find the client id that's being called? can't find a log for it
@spdavid @mirkori where do you find the client id that's being called? can't find a log for it
In chrome in the developer tools under the console I was able to see the error when using the graphClient. You will find the id in the url that is referenced in the error information.
Example
var graphClient = await this.props.ctx.msGraphClientFactory.getClient();
let data = await graphClient.api(your graph call).get();
I restored the app, but apparently all my API permissions have been removed from the API management page. Existing apps don't work anymore...
@NickSevens
Thats a scenario that i did not have as i only had my apps and no existing ones.
You can restore the groups using powershell and hopefully you get the permissions back. https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/groups-restore-deleted
Anyone looking this up? @VesaJuvonen @patmill
Got it to work by:
- deleting all "SharePoint Online Client Extensibility Web Application Principal" apps except the one referenced in the mentioned console messages (thanks @spdavid)
- re-deploying SPFx apps to the app catalog
- re-approving permissions in the API management page