名前空間: microsoft.graph
重要
Microsoft Graph の /beta バージョンの API は変更される可能性があります。 実稼働アプリケーションでこれらの API を使用することは、サポートされていません。 v1.0 で API を使用できるかどうかを確認するには、Version セレクターを使用します。
アプリケーションで verifiedPublisher を設定します。 検証済み発行元の設定の前提条件など、詳細については、「Publisher の 検証」を参照してください。
この API は、次の国内クラウド展開で使用できます。
| グローバル サービス |
米国政府機関 L4 |
米国政府機関 L5 (DOD) |
21Vianet が運営する中国 |
| ✅ |
❌ |
❌ |
❌ |
アクセス許可
この API の最小特権としてマークされているアクセス許可またはアクセス許可を選択します。
アプリで必要な場合にのみ、より高い特権のアクセス許可またはアクセス許可を使用します。 委任されたアクセス許可とアプリケーションのアクセス許可の詳細については、「アクセス許可の種類」を参照してください。 これらのアクセス許可の詳細については、「アクセス許可のリファレンス」を参照してください。
| アクセス許可の種類 |
最小特権アクセス許可 |
より高い特権のアクセス許可 |
| 委任 (職場または学校のアカウント) |
Application.ReadWrite.All |
注意事項なし。 |
| 委任 (個人用 Microsoft アカウント) |
サポートされていません。 |
サポートされていません。 |
| アプリケーション |
サポートされていません。 |
サポートされていません。 |
重要
職場または学校アカウントを使用する委任されたシナリオでは、管理者にサポートされているMicrosoft Entraロールまたはサポートされているロールのアクセス許可を持つカスタム ロールを割り当てる必要があります。 この操作では、次の最小特権ロールがサポートされています。
- テナント管理者がアクセスを制限していない限り、既定のユーザーアクセス許可を持つ管理者以外のメンバーまたはゲスト
- アプリケーション開発者 - 管理者がメンバーとゲストへのアクセスを制限している場合でもアプリを作成します。このロールを持つプリンシパルには、作成するアプリの所有権が割り当てられます
- ディレクトリ ライター - 拡張機能のプロパティを更新する
- ハイブリッド ID 管理者 - 基本プロパティのみを更新する
- セキュリティ管理者
- クラウド アプリケーション管理者
- アプリケーション管理者
HTTP 要求
アプリケーションのアドレスは、 その ID または appId を使用して行うことができます。
id と appId は、Microsoft Entra 管理センターのアプリ登録でそれぞれオブジェクト ID とアプリケーション (クライアント) ID と呼ばれます。
POST /applications/{id}/setVerifiedPublisher
POST /applications(appId='{appId}')/setVerifiedPublisher
| 名前 |
説明 |
| Authorization |
ベアラー {token}。 必須です。
認証と認可についての詳細をご覧ください。 |
| Content-Type |
application/json. 必須です。 |
要求本文
要求本文で、次の必須プロパティを指定します。
| プロパティ |
型 |
説明 |
| verifiedPublisherId |
string |
発行元のパートナー センター アカウントから、アプリケーションに設定する検証済み発行元の Microsoft Partner Network ID (MPNID)。 |
応答
成功した場合、このメソッドは 204 No Content 応答コードを返します。
例
要求
次の例は要求を示しています。
POST https://graph.microsoft.com/beta/applications/{id}/setVerifiedPublisher
Content-type: application/json
{
"verifiedPublisherId": "1234567"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Applications.Item.SetVerifiedPublisher;
var requestBody = new SetVerifiedPublisherPostRequestBody
{
VerifiedPublisherId = "1234567",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.Applications["{application-id}"].SetVerifiedPublisher.PostAsync(requestBody);
// Code snippets are only available for the latest major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphapplications "github.com/microsoftgraph/msgraph-beta-sdk-go/applications"
//other-imports
)
requestBody := graphapplications.NewSetVerifiedPublisherPostRequestBody()
verifiedPublisherId := "1234567"
requestBody.SetVerifiedPublisherId(&verifiedPublisherId)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.Applications().ByApplicationId("application-id").SetVerifiedPublisher().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.applications.item.setverifiedpublisher.SetVerifiedPublisherPostRequestBody setVerifiedPublisherPostRequestBody = new com.microsoft.graph.beta.applications.item.setverifiedpublisher.SetVerifiedPublisherPostRequestBody();
setVerifiedPublisherPostRequestBody.setVerifiedPublisherId("1234567");
graphClient.applications().byApplicationId("{application-id}").setVerifiedPublisher().post(setVerifiedPublisherPostRequestBody);
const options = {
authProvider,
};
const client = Client.init(options);
const setVerifiedPublisher = {
verifiedPublisherId: '1234567'
};
await client.api('/applications/{id}/setVerifiedPublisher')
.version('beta')
.post(setVerifiedPublisher);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Applications\Item\SetVerifiedPublisher\SetVerifiedPublisherPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new SetVerifiedPublisherPostRequestBody();
$requestBody->setVerifiedPublisherId('1234567');
$graphServiceClient->applications()->byApplicationId('application-id')->setVerifiedPublisher()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Beta.Applications
$params = @{
verifiedPublisherId = "1234567"
}
Set-MgBetaApplicationVerifiedPublisher -ApplicationId $applicationId -BodyParameter $params
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.applications.item.set_verified_publisher.set_verified_publisher_post_request_body import SetVerifiedPublisherPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = SetVerifiedPublisherPostRequestBody(
verified_publisher_id = "1234567",
)
await graph_client.applications.by_application_id('application-id').set_verified_publisher.post(request_body)
応答
次の例は応答を示しています。
HTTP/1.1 204 No Content