A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
Hello,
we have exactly the same problem. We want to gather information from whole SPO (Included Sites, Teams and MySites). Gathering information from Sites and Teams are working perfectly, but when we want to gather information from MySites ( company-my.sharepoint.com/...) it's returning "The remote server returned an error: (401) Unauthorized.".
We are using registered APP in Entra ID with certificate and application permissions for SharePoint:
"roles": [ "User.Read.All", "Sites.Read.All", "Sites.FullControl.All"].
It looks like a "bug" that we cannot access MySites for all users.