Access Denied: XXXX needs the following permission(s) to perform this action: View audit log – Azure DevOps Error

Full Error:
Access Denied: Ramanean needs the following permission(s) to perform this action: View audit log

Solution:
The user needs to have Project Collection Administrator access to view Audit logs

API Error

{
    "$id": "1",
    "customProperties": {
        "Descriptor": "Microsoft.IdentityModel.Claims.ClaimsIdentity;00037FFEFF7D4161@Live.com",
        "IdentityDisplayName": "Ramanean",
        "Token": "AllPermissions",
        "RequestedPermissions": 1,
        "NamespaceId": "1f4179b3-6bac-4d01-b421-71ea09171400"
    },
    "innerException": null,
    "message": "Access Denied: Ramanean needs the following permission(s) to perform this action: View audit log",
    "typeName": "Microsoft.VisualStudio.Services.Security.AccessCheckException, Microsoft.VisualStudio.Services.WebApi",
    "typeKey": "AccessCheckException",
    "errorCode": 0,
    "eventId": 3000
}

You may also like...