GET /users/{userPrincipalName}/mySite response "302 Found"

Hui Xu 0 Reputation points Microsoft Employee
2023-08-03T08:26:47.3466667+00:00

I am trying to use the https://graph.microsoft.com/v1.0/users/{userPrincipalName}/mySite to get the users' onedrive site, but some requests received "302 Found"

And I got these in response header

Location:/_layouts/15/Throttle.htm#9
Ratelimit-Limit:100, 100;w=300;x-spo-scope="user";comment="Resource Percentage"
Ratelimit-Remaining:0
Ratelimit-Reset:58

Then redirect to "https://graph.microsoft.com/_layouts/15/Throttle.htm" and received "404"

{
    "error": {
        "code": "ResourceNotFound",
        "message": "Invalid version: _layouts",
        }
    }
}

It seems to be related to the throttling, but it does not return 429(Too many requests) refer to https://learn.microsoft.com/en-us/graph/throttling

And I think I'm far from the limits apply to the users resources refer to https://learn.microsoft.com/en-us/graph/throttling-limits#identity-and-access-service-limits

I want to know why I received 302 redirect.

Could anyone help me with this?

Thanks.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
12,289 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,154 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.