There is a requirement to manage access to shared mailboxes via group membership programmatically. When a user is added or removed from the group access is granted/removed.
The issue normally occurs when granting access to several users in one go.
原因
The following exceptions can appear logged by EXO when processing several requests in parallel:
- Null reference error which indicates that Active Roles did not get correct data or received no data for this request: System.NullReferenceException: Object reference not set to an instance of an object. at ActiveRoles.Service.ExchangeManagement.ExchangeOnlineMailboxPropertiesPolicy.OnPostModifyObject(RequestContext context, ModifyObjectRequest request)
- Graph response Errors: NotFound Microsoft.Graph.ServiceException: Code: Request_ResourceNotFound Message: Resource 'xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx' does not exist or one of its queried reference-property objects are not present. Inner error: AdditionalData: date: 2024-09-09T09:29:46 request-id: d4fabc9a-xxxx-xxxx-xxxx-2c299e6387aa client-request-id: d4fabc9a-xxxx-xxxx-xxxx-2c299e6387aa ClientRequestId: d4fabc9a-xxxx-xxxx-xxxx-2c299e6387aa
at Microsoft.Graph.HttpProvider.<SendAsync>d__18.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
解决办法
Status The Active Roles product team has raised Enhancement Request #466068 to manage EXO exceptions in a future version of Active Roles. Workaround NA