Describe the bug
When calling CreateLinkPostRequestBody to create a sharing link and RetainInheritedPermissions is not defined, it defaults to false.
This is the opposite of the behavior listed in the learn article.
Defining RetainInheritiedPermissions true or false operates as expected.
This bug doesn't appear in this repo but it does appear in the Python SDK #1536
Expected behavior
The default behavior should be to retain the items current permissions, ala RetainInheritedPermissions = true.
How to reproduce
var requestBody = new CreateLinkPostRequestBody
{
Type = "view",
Scope = "users",
ExpirationDateTime = DateTime.UtcNow.AddMinutes(10),
Recipients =
[
new() {
Email = "user@domain.com"
}
]
};
await _graph!.Drives[DriveID].Items[DriveItemID].CreateLink.PostAsync(requestBody, cancellationToken: cancellationToken).ConfigureAwait(false) ?? throw new FileNotFoundException();
//Will result in user@domain.com getting access for ten minutes but all other access will be wiped. Adding 'RetainInheritedPermissions = true,' corrects the behavior.
SDK Version
6.2.0
Latest version known to work for scenario above?
No response
Known Workarounds
Define RetainInheritedPermissions when creating a new CreateLinkPostRequestBody
Debug output
Click to expand log
```
</details>
### Configuration
_No response_
### Other information
_No response_
Describe the bug
When calling CreateLinkPostRequestBody to create a sharing link and RetainInheritedPermissions is not defined, it defaults to false.
This is the opposite of the behavior listed in the learn article.
Defining RetainInheritiedPermissions true or false operates as expected.
This bug doesn't appear in this repo but it does appear in the Python SDK #1536
Expected behavior
The default behavior should be to retain the items current permissions, ala RetainInheritedPermissions = true.
How to reproduce
var requestBody = new CreateLinkPostRequestBody
{
Type = "view",
Scope = "users",
ExpirationDateTime = DateTime.UtcNow.AddMinutes(10),
Recipients =
[
new() {
Email = "user@domain.com"
}
]
};
await _graph!.Drives[DriveID].Items[DriveItemID].CreateLink.PostAsync(requestBody, cancellationToken: cancellationToken).ConfigureAwait(false) ?? throw new FileNotFoundException();
//Will result in user@domain.com getting access for ten minutes but all other access will be wiped. Adding 'RetainInheritedPermissions = true,' corrects the behavior.
SDK Version
6.2.0
Latest version known to work for scenario above?
No response
Known Workarounds
Define RetainInheritedPermissions when creating a new CreateLinkPostRequestBody
Debug output
Click to expand log
```