Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Additional examples for creating a new application: New-MgApplication

オープン
#3,369 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
55/100
issue の種類
ドキュメント
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
powershell
領域
documentation

調査の方向性

New-MgApplication のドキュメント ページと、そこにある既存の例および注記セクションから始めます。Web 設定と必要なリソース アクセスに関する 2 つの提案された例を、それぞれの説明とともに追加します。このページでこれらのパラメーターの組み合わせが明確に示されれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

説明

type:feature
Is your feature request related to a problem? Please describe the problem.

Some of the documentation lacks clarity and could use additional examples. For instance, the New-MgApplication documentation page contains one example but accepts close to 55 parameters. While it's impractical to add an example for each one of them, the documentation could use a couple of more examples. The notes section shows what properties each of them should contain so to expand on a couple of them and demonstrate would be helpful

Describe the solution you'd like.

The documentation could be updated with the following examples:

Example 1: Create a new application with web settings
New-MgApplication -DisplayName "New app" -Web @{
            ImplicitGrantSettings = @{
                EnableAccessTokenIssuance = $true
                EnableIdTokenIssuance     = $true
            }
            RedirectUris = "http://localhost.com"
        }

The above example creates a new application with both access tokens and Id tokens to be issued. Additionally, it also sets the redirect uri for the app registration to redirect to after successful authentication

Example 2: Create a new application with access to specified resources

Step1: Create a JSON representation of the required resources

$RequiredResource= @'[
        {
            "ResourceAppId": "00000003-0000-0000-c000-000000000000",
            "ResourceAccess": [
                {
                    "Id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
                    "Type": "Scope"
                },
                {
                    "Id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
                    "Type": "Role"
                }
            ]
        },
        {
            "ResourceAppId": "00000002-0000-0000-c000-000000000000",
            "ResourceAccess": [
                {
                    "Id": "e1fe6dd8-ba31-4d61-89e7-88639da4683d",
                    "Type": "Scope"
                }
            ]
        }
    ]'@

Step 2: Read the JSON object

$RequiredResourceAccess = @(
$RequiredResource | ForEach-Object {
                @{
                    ResourceAppId  = $_.ResourceAppId
                    ResourceAccess = @(
                        $_.ResourceAccess | ForEach-Object {
                            @{
                                Id   = $_.Id
                                Type = $_.Type
                            }
                        }
                    )
                }
            })

Step 3: Create the application

New-MgApplication -DisplayName $AppRegistrationName -RequiredResourceAccess $RequiredResourceAccess

The above example allows for creation of an app registration with access to several required resources and permissions

Additional context?

No response

主要言語
C#
スター
898
フォーク
230
平均マージ
2日 5時間
マージ済み PR(30日)
31

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

microsoftgraph/msgraph-sdk-powershell のほかの issue

microsoftgraph/msgraph-sdk-powershell の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。