The SIDHistory attribute of a user object is used to store old SIDs for that user (usually SIDs from other domains when the user is migrated). In some cases, over time, this attribute can hold lots of values (every time a user is migrated, the previous SID is added to the list), and we sometimes get requests that this can be cleared. There is a very old KB (295758) describing how to clear the attribute, however, this can have knock-on effects if you are using Exchange.
When mailbox permissions are set, the SID of the user is used to identify the delegate. When the user migrates, the SID on the mailbox permissions no longer matches the delegate's SID, however, it does match one in SIDHistory, so everything still works. When you delete SIDHistory, you'll then remove the permissions for any delegates that are matched using that attribute.
I have written a set of scripts that can be used to store mailbox permissions and then clear the SIDHistory. The mailbox permissions can then be applied back. This turned out to be a fairly complicated process, though the end result is more or less straight-forward. I must reiterate at this point that use of these scripts is entirely at your own risk.
The process, step-by-step, is:
The required scripts are below. The above assumes that you are logged in as an administrator and have been granted impersonation rights to all the mailboxes being processed.
All these scripts can take a long time to run if you are processing a large number of mailboxes. As mentioned in point 4, it would be advisable to run it in batches.