sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

API management (admin) - [Version]:16.0.0.8901 - Another object with the same value for property identifierUris already exists.

Open ypcode opened this issue 7 years ago • 37 comments

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 image

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

ypcode avatar May 06 '19 20:05 ypcode

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar May 06 '19 20:05 msft-github-bot

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."

spfx_permission_appidentifieruri

mirkori avatar May 07 '19 14:05 mirkori

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 image

I checked on another brand new developer tenant and I get exactly the same issue

ypcode avatar May 07 '19 20:05 ypcode

Same issue here. Also is weird that I´m seeing 2 Azure Ad Apps registered as "SharePoint Online Client Extensibility Web Application Principal"

luismanez avatar May 08 '19 15:05 luismanez

I see it 6 times image

Actually my SPFx app specifies 3 permission requests, and I deployed it two times... I really suspect it is related to that...

ypcode avatar May 08 '19 15:05 ypcode

Seems so! I always thought there should be only one App registered that way for all the spfx solutions using aadHttpClient...

luismanez avatar May 08 '19 15:05 luismanez

It looks like it is what the error message says somehow...

ypcode avatar May 08 '19 15:05 ypcode

I edited the title since the real issue is really this one...

ypcode avatar May 08 '19 15:05 ypcode

Can confirm same issue on multiple tenants.

frnk01 avatar May 08 '19 17:05 frnk01

Exactly the same issue on my two dev tenant and my prod tenant image

ypcode avatar May 08 '19 20:05 ypcode

Same issue.

AppRegistrations

rob-windsor avatar May 08 '19 23:05 rob-windsor

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.

spdavid avatar May 09 '19 06:05 spdavid

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.

nse7ens avatar May 09 '19 07:05 nse7ens

@spdavid Thank you very much that workaround is working! Anyway the underlying issue still exists.

mirkori avatar May 09 '19 07:05 mirkori

@spdavid @mirkori where do you find the client id that's being called? can't find a log for it

nse7ens avatar May 09 '19 07:05 nse7ens

@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();

spdavid avatar May 09 '19 07:05 spdavid

I restored the app, but apparently all my API permissions have been removed from the API management page. Existing apps don't work anymore...

nse7ens avatar May 09 '19 07:05 nse7ens

@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

spdavid avatar May 09 '19 07:05 spdavid

Anyone looking this up? @VesaJuvonen @patmill

frnk01 avatar May 09 '19 08:05 frnk01

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

nse7ens avatar May 09 '19 09:05 nse7ens