Application `setOnPremisesPublishing` not working
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- openapi, php
調査の方向性
まず、生成された Application モデルと OnPremisesPublishing モデルを、beta openapi.yaml のエントリおよびレポートに示されているシリアライズ済みのリクエストボディと比較します。SDK v2.25.0 を使用して PATCH を再現し、次に、出力されたペイロードが動作する Bruno リクエストと一致すること、および Graph API が 204 No Content を返すことを確認します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
Hi,
I am trying to update an applications onPremisesPublishing configuration, which isn't working.
I have used the following guide Configure Microsoft Entra application proxy using Microsoft Graph APIs which works until the Step 2.2 where the onPremisesPublishing settings should be set/updated.
I only get the follow translated OData-Error:
InvalidJson_BadRequest : Valid JSON content expected.
Expected behavior
That the settings would be set at the MS Graph Beta API would return an 204 - No Content.
How to reproduce
I used the following code Step 2.2: Configure the onPremisesPublishing property
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\Application;
use Microsoft\Graph\Beta\Generated\Models\OnPremisesPublishing;
use Microsoft\Graph\Beta\Generated\Models\ExternalAuthenticationType;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new Application();
$onPremisesPublishing = new OnPremisesPublishing();
$onPremisesPublishing->setExternalAuthenticationType(new ExternalAuthenticationType('aadPreAuthentication'));
$onPremisesPublishing->setInternalUrl('https://contosoiwaapp.com');
$onPremisesPublishing->setExternalUrl('https://contosoiwaapp-contoso.msappproxy.net');
$onPremisesPublishing->setIsHttpOnlyCookieEnabled(true);
$onPremisesPublishing->setIsOnPremPublishingEnabled(true);
$onPremisesPublishing->setIsPersistentCookieEnabled(true);
$onPremisesPublishing->setIsSecureCookieEnabled(true);
$onPremisesPublishing->setIsStateSessionEnabled(true);
$onPremisesPublishing->setIsTranslateHostHeaderEnabled(true);
$onPremisesPublishing->setIsTranslateLinksInBodyEnabled(true);
$requestBody->setOnPremisesPublishing($onPremisesPublishing);
$result = $graphServiceClient->applications()->byApplicationId('application-id')->patch($requestBody)->wait();
SDK Version
v2.25.0
Latest version known to work for scenario above?
No response
Known Workarounds
I have tested around with the follow client bruno.
If I use the following body, I am able to update the settings:
{
"@odata.type": "#microsoft.graph.application",
"microsoft.graph.onPremisesPublishing": {
"@odata.type": "#microsoft.graph.onPremisesPublishing",
"isOnPremPublishingEnabled": true
}
}
This is the json body which is generated from the SDK:
{
"@odata.type": "#microsoft.graph.application",
"onPremisesPublishing": {
"isOnPremPublishingEnabled": true
}
}
which was not working as I have tried it with bruno.
Even using:
{
"@odata.type": "#microsoft.graph.application",
"onPremisesPublishing": {
"@odata.type": "#microsoft.graph.onPremisesPublishing",
"isOnPremPublishingEnabled": true
}
}
did not worked.
There must be something "in the back" what is causing the above mentioned error.
Debug output
Configuration
- OS: macOS Sequoia 15.1.1
- architecture: M3 Pro
- used PHP version:
PHP 8.3.16 (cli) (built: Jan 17 2025 01:31:19) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.16, Copyright (c) Zend Technologies
with Zend OPcache v8.3.16, Copyright (c), by Zend Technologies
with Xdebug v3.4.1, Copyright (c) 2002-2025, by Derick Rethans
Other information
I have check the OpenAPI-file at github.com/microsoftgraph/msgraph-metadata/blob/master/openapi/beta/openapi.yaml and couldn't see any issue/error why this is not working 😟
Disclaimer: I know that is the beta API version 😄
- 主要言語
- PHP
- スター
- 13
- フォーク
- 8
- 平均マージ
- 11時間 23分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoftgraph/msgraph-beta-sdk-php のほかの issue
-
status:waiting-for-triage ToTriage type:bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
-
dependency:metadata ToTriage type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 48/100
microsoftgraph/msgraph-beta-sdk-php#321 · コメント 1 件 ·
-
ToTriage type:enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
microsoftgraph/msgraph-beta-sdk-php#309 · コメント 1 件 ·
microsoftgraph/msgraph-beta-sdk-php の issue をすべて見る
似ている issue
-
product / databases
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
VilnaCRM-Org/user-service#525 ·
メンテナーはふだん 21 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
shukiv/jabali-panel#2029 ·
メンテナーはふだん 1 日以内に返信
-
area:pool-types good first issue priority:low type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
crazy-goat/php-fpm-ng#822 ·
メンテナーはふだん 1 日以内に返信
-
agentic bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MagnaCapax/PMSS#1023 · コメント 1 件 ·
メンテナーはふだん 5 日以内に返信