0

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.

  • 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 Mar 13 '20 at 13:22
  • Hi, do you have a chance to look into my answer? Is it helpful? – Allen Wu Mar 18 '20 at 06:29

1 Answers1

0

I can reproduce your issue via the following steps:

I already have a user account: allen3@tenant.onmicrosoft.com. It has an alias (proxyAddress): allenwu@tenant.onmicrosoft.com.

enter image description here

Now I create a new account through Microsoft Graph API with allenwu@tenant.onmicrosoft.com as the userPrincipalName.

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

{
  "accountEnabled": true,
  "displayName": "allent3",
  "mailNickname": "allent3",
  "userPrincipalName": "allenwu@tenant.onmicrosoft.com",
  "passwordProfile" : {
    "forceChangePasswordNextSignIn": false,
    "password": "password-value"
  }
}

The magic happened: the account was created successfully!

But when I assign license to the account allenwu@tenant.onmicrosoft.com 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.

Allen Wu
  • 15,529
  • 1
  • 9
  • 20
  • For account creation there was no issue. Same like you I created the user successfully but having issue while assigning license. Actually proxyAddress is the property of ExchangeOnline which you can not assign value when creating the object. Here is the lack of Graph API. But when you are trying to assign license it looks for proxyAddress which is not present. This is a known issue I came to know later. https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/35897077-supportability-for-more-attributes-with-ms-graph-a – Suman Mitra Mar 19 '20 at 13:35
  • @SumanMitra Yes. `proxyAddress ` is read-only. But you can get it with `?$select=proxyAddresses`. So you don't have another account with a proxyAddress which is same as the new account? – Allen Wu Mar 20 '20 at 05:14