-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to update Application's property use Microsoft Graph REST API ? #2788
Comments
Seems like you are trying to update the
|
Hi @MartinM85 Thank you , I am not want to update passwordCredential ,I Just want to update Web properites. app.Web.ImplicitGrantSettings.EnableAccessTokenIssuance = ap.EnableAccessTokenIssuance;
app.Web.ImplicitGrantSettings.EnableIdTokenIssuance = ap.EnableIdTokenIssuance; What do I to modify the app.Web's properties? |
I got it , // Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new Application
{
AppRoles = new List<AppRole>
{
new AppRole
{
AllowedMemberTypes = new List<string>
{
"User",
"Application",
},
Description = "Survey.Read",
DisplayName = "Survey.Read",
Id = Guid.Parse("ebb7c86c-fb47-4e3f-8191-420ff1b9de4a"),
IsEnabled = false,
Origin = "Application",
Value = "Survey.Read",
},
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Applications["{application-id}"].PatchAsync(requestBody); application-Id and requestBody are two different parameters. RequestBody cannot use the original App information. |
Discussed in #2787
Originally posted by FisherMS January 3, 2025
When I execute up codes ,then get a throw exception.
How to update the Application's Properties?
The text was updated successfully, but these errors were encountered: