Using the beta applications api, and having the 'web' or 'api' properties in the payload (reference here) returns Internal Server Error - 500.
If the web and api properties are removed, the application is created successfully.
Attempting to create the application without the web and api and then attempting to update the properties via PATCH still results to a 500 response. Looking up the request Id on graph logs also does not give information on what could be wrong.
According to the known issues topic, there are changes currently in development in the applications resource. Is this related?
What would be the correct way to create an application with these properties?
An example request looks like this,
{
"api": {
"oauth2PermissionScopes": [
{
"adminConsentDescription": "Allow the application to access Chorus Cluster (richf02.dev.ossiaco.com) on behalf of the signed-in user.",
"adminConsentDisplayName": "Access Chorus Cluster (richf02.dev.ossiaco.com)",
"id": "b128e2f0-5463-427b-aab3-362eb17404ce",
"isEnabled": true,
"origin": "Application",
"type": "User",
"userConsentDescription": "Allow the application to access Chorus Cluster (richf02.dev.ossiaco.com) on your behalf.",
"userConsentDisplayName": "Access Chorus Cluster (richf02.dev.ossiaco.com)",
"value": "user_impersonation"
}
]
},
"appRoles": [
{
"allowedMemberTypes": [
"User"
],
"description": "Admins can manage roles and perform all task actions",
"displayName": "Admin",
"id": "4b91dc99-04e7-4820-8288-bc765d66a61d",
"isEnabled": true,
"origin": "Application",
"value": "Admin"
},
{
"allowedMemberTypes": [
"User"
],
"description": "ReadOnly roles have limited query access",
"displayName": "ReadOnly",
"id": "accb8309-f2e9-49ae-b845-3cae103f68a4",
"isEnabled": true,
"origin": "Application",
"value": "User"
}
],
"displayName": "Chorus Cluster (richf02.dev.ossiaco.com)",
"optionalClaims": {
"accessToken": [
{
"additionalProperties": [
"use_guid"
],
"name": "aud"
}
]
},
"requiredResourceAccess": [
{
"resourceAccess": [
{
"id": "311a71cc-e848-46a1-bdf8-97ff7156d8e6",
"type": "Scope"
}
],
"resourceAppId": "00000002-0000-0000-c000-000000000000"
}
],
"signInAudience": "AzureADMyOrg",
"web": {
"homePageUrl": "https://richf02.dev.ossiaco.com:19080/Explorer/index.html",
"oauth2AllowImplicitFlow": true,
"redirectUris": [
"https://richf02.dev.ossiaco.com:19080/Explorer/index.html"
]
}
}
Example request ids for tracing.
Message: Encountered an internal server error.
Inner error:
AdditionalData:
date: 2021-07-08T16:35:06
request-id: 4263c611-dfa4-4e33-96f7-b08702f3cc96
client-request-id: 4263c611-dfa4-4e33-96f7-b08702f3cc96
ClientRequestId: 4263c611-dfa4-4e33-96f7-b08702f3cc96
Sourced from https://github.com/microsoftgraph/msgraph-beta-sdk-dotnet/issues/320

