Describe the bug
Creating a space link with incorrect permissions returns a 400 instead of a 403 , causing a wrong error message in clients.
Steps to reproduce - Actual behavior
The following curl creates a link over a space.
curl -H 'Authorization: Bearer xxx' \
-X POST 'https://xx.xx.xx.xx:9200/graph/v1beta1/drives/<drive-id>/root/createLink' -d '{"displayName":"test","password":"...","type":"view"}'
If the user is not allowed to perform that actions, server returns with a 400 and the following payload:
{
"error": {
"code": "invalidRequest",
"innererror": {
"date": "2026-04-01T11:31:31Z",
"request-id": "1b253441-34b5-4324-856e-041d18be46ea"
},
"message": "no share permission"
}
}
Expected behavior
Error code should be 403 Forbidden instead of 400
Setup

Describe the bug
Creating a space link with incorrect permissions returns a
400instead of a403, causing a wrong error message in clients.Steps to reproduce - Actual behavior
The following
curlcreates a link over a space.If the user is not allowed to perform that actions, server returns with a
400and the following payload:Expected behavior
Error code should be
403 Forbiddeninstead of400Setup