LogPermissionDenied.IPermissionDeniedErrorFragment which is an auto-generated interface from Strawberry shake based on a GraphQL fragment, that doesn't really matter that much, it is just to provide some context.ILogger<T> has a method called LogError with an overload that accepts an string message and a params object?[] argsLogPermissionDenied function and call it with a string that is contextual to the location it occurs in the code, the extension method should then append some more information regarding the permission that was denied.customDimensions in Application Insights, and that it is not possible to "screw up" the params (since they are positional).