0
votes

I am trying to assign license to a user with Office 365 business premium skuid but getting following error. Request body:

{
  "addLicenses": [
    {
      "skuId": "skuid"
    }
  ],
  "removeLicenses": []

}

Response

{
  "error": {
    "code": "Request_BadRequest",
    "message": "Another object with the same value for property proxyAddresses already exists.",
    "innerError": {
      "request-id": "b94663b1-f58f-4e30-a457-3db66a0f0b51",
      "date": "2020-03-13T11:22:35"
    },
    "details": [
      {
        "target": "proxyAddresses",
        "code": "ObjectConflict"
      }
    ]
  }
}

But the user whom I am assigning license is unique.

Any help is much appreciated.

1
Looks like, the problem is the way I have created the user whom I am assigning license. I created the user using graph api where I can not provide proxyAddress attribute. Because the Graph API has no write access to the attribute.It is an attribute that is owned by the Exchange Online product. Per the Graph API documentation the proxyAddresses attribute is only "read only" via the Graph. Is there anyway to achieve what I am trying through only api calls? - Suman Mitra
Hi, do you have a chance to look into my answer? Is it helpful? - Allen Wu

1 Answers

0
votes

I can reproduce your issue via the following steps:

I already have a user account: [email protected]. It has an alias (proxyAddress): [email protected].

enter image description here

Now I create a new account through Microsoft Graph API with [email protected] as the userPrincipalName.

POST https://graph.microsoft.com/v1.0/users
Content-type: application/json

{
  "accountEnabled": true,
  "displayName": "allent3",
  "mailNickname": "allent3",
  "userPrincipalName": "[email protected]",
  "passwordProfile" : {
    "forceChangePasswordNextSignIn": false,
    "password": "password-value"
  }
}

The magic happened: the account was created successfully!

But when I assign license to the account [email protected] with Microsoft Graph API, it gives me the same error as yours.

enter image description here

So I think this error prompt is reasonable. (Although it is unreasonable for the account to be created successfully.)

Please check if your tenant has the same problem as me. Hope it's helpful.