scope update via application patch function not working
@andrueastman is already working on this.
Since Feb 19, 2025.
Assessment
This issue has not been assessed yet.
Description
Describe the bug
Since updating to Microsoft Graph SDK version 6.17.0, our functions for updating/patching an application's 'oauth2PermissionScopes' seem to be failing in our Kotlin app.
Java Version: 17
Kotlin Version: 2.1.0
For example, if I try to change the 'oauth2PermissionScopes' name from "Files.Read" to "Directory.Read," the response from the 'Application patch' function is null. I assume this is a good sign since, when I debug and intentionally cause an error, such as by using an incorrect application ID (or object ID), I do receive an error response.
executed code to patch application:
fun updateApplication(app: Application) {
try {
graphServiceClient.applications()
.byApplicationId(app.id)
.patch(app)
} catch (e: ApiException) {
...
}
}
applicationToUpdate.api.oauth2PermissionScopes JSON object:
[
{
"id": "1234abcd-12ab-12ab-12ab-123456abcdef",
"name": "Files.Read",
"type": "User",
"consentDisplayName": "Read your files",
"consentDescription": "Allows the application to read your directories"
}
]
However, when using version 6.16.0, the application’s 'oauth2PermissionScopes' are updated successfully after calling the patch function. In contrast, when performing the same operation with version 6.17.0, the 'oauth2PermissionScopes' remain unchanged (in this case, still showing "Files.Read").
Expected behavior
I'd expect, that the 'oauth2PermissionScopes' would be updated the same as in version '6.16.0'.
How to reproduce
- search a test application
- create an application object of the test application
- change the oauth2PermissionScopes name
- run the application patch function using the object id you copied and the application object copy you created
SDK Version
=> 6.17.0
Latest version known to work for scenario above?
6.16.0
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- Dominant language
- Java
- Stars
- 444
- Forks
- 154
- Avg merge
- 18h 28m
- Merged PRs (30d)
- 4
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoftgraph/msgraph-sdk-java
-
status:waiting-for-triage type:bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
microsoftgraph/msgraph-sdk-java#2610 ·
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
microsoftgraph/msgraph-sdk-java#2656 ·
-
status:waiting-for-triage type:bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
microsoftgraph/msgraph-sdk-java#2654 ·
-
status:waiting-for-triage
Difficulty 4/5 3-5 days Newbie friendliness 35/100
microsoftgraph/msgraph-sdk-java#2639 ·
-
status:waiting-for-triage type:bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
microsoftgraph/msgraph-sdk-java#2589 · 1 comment ·
All issues in microsoftgraph/msgraph-sdk-java
Similar issues
-
certification
Difficulty 1/5 Under an hour Newbie friendliness 80/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
[BUG] ECR GetAuthorizationToken returns a proxyEndpoint for the default region, not the request's Openbug ecr
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Needs: Triage Type: Feature request
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
AntennaPod/AntennaPod#8794 ·
-
agentic-workflows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
github/copilot-sdk#2760 ·