Using logs API with Organization read only user role

I am trying to use logs API from here:
and I get 401 access error even though the credentials I use are authorized

{“detail”:“Current user is not authorized to perform this action.”,“error”:401,“errorCode”:“USER_UNAUTHORIZED”,“parameters”:,“reason”:“Unauthorized”}%


Some tiers, at least free tiers, do not allow the use of the logs API. For more information, see

In particular, the paragraph:


This feature is not available for M0 (Free Tier), M2 , and M5 clusters. To learn more about which features are unavailable, see Atlas M0 (Free Tier), M2, and M5 Limitations.

Thanks for the answer.
This is not the case, as Im trying to pull logs of M50 and M60 clusters.


May it is the following then.


You must have the Project Data Access Read Only role or higher in the project that the cluster belongs to in order to retrieve the log.

My current permissions are Organization read-only, which should cover project-specific data access. Isn’t it?

Organization Read Only entitles you to effectively have Project Read Only for each Project. However Project Read Only is not the same as Project Data Access Read Only.

I do apologize that “Project Read Only” and “Project Data Access Read Only” are so similarly worded: this has a legacy reason that I won’t go into. Really “Project Read Only” should be called “Project Metadata View Only” since it does not grant access to cluster data contents.