Error Refreshing

Greg Zygadlo

Last few days I have been getting this error and wondering how I may solve it.


Data source error:Column 'UserId' in Table 'UserActivity' contains a duplicate value '159FF9DCDA02493C50737375F7C2CA22' and this is not allowed for columns on the one side of a many-to-one relationship or for columns that are used as the primary key of a table.
Activity ID:7a6e2a81-0d2f-4ff4-a52c-3c30c457dba2
Request ID:c7d80a60-4ef6-45bb-a79c-8dee0f3ecbfc
Time:2017-08-31 04:08:52Z


4 Replies
Same here. any way to fix would be great!

First step is to find the offending userID.  Here is how I found it.

Click on the Office 365 Adoption Preview (DATASET).

On the right under "Fields", find and expand the table UserState.

Scroll down and select the "DisplayName" field, and the "UserID" Field.

Now simply sort the UserID field and scroll down to find the corresponding Display Name.


In my case this was a terminated user who's account had not been properly disabled.  I believe that the archive mailbox was not removed along with the user mailbox. (Your situation may be different)

I performed the following steps to remove the archive mailbox.


Open Windows Azure Active Directory Module for Windows Power Shell
Connect and start session


Run this shell command to delete the user from AzureAD
Remove-MsolUser -UserPrincipalName

NOTE: This puts the user account into a Recycle Bin which allows for restore within 30 days. We need to purge it.

Run this command to get list of users in Recycle bin.

Get-MsolUser -ReturnDeletedUsers | fl UserPrincipalName,ObjectID


Returns the following:
UserPrincipalName :
ObjectId : bd551682-6475-49d9-9c4b-0794edd9471a


Run this command to purge from Recycle bin.

Remove-MsolUser -RemoveFromRecycleBin -ObjectId bd551682-6475-49d9-9c4b-0794edd9471a

Hope this helps.

We are aware of this issue and will be rolling out a fix to this issue very soon

When will the fix being rolled out?

We have Octobre 2018 and the issue still persists in Excel 2016 / Power Query / BI



Related Conversations