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

Supported way to get the token

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

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
csharp, powershell

調査の方向性

Start by reviewing the authentication changes in #3789 and the former GraphSession access mentioned in the issue. Clarify how a Get-MgAccessToken command should return cached or fresh tokens, handle scopes, and document the supported usage; completion should include the command and its documentation.

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

説明

status:waiting-for-triage type:feature
Is your feature request related to a problem? Please describe the problem.

For a long time there was an undocumented way to get an access token from the current session using code like [Microsoft.Graph.PowerShell.Authentication.GraphSession]::Instance...
This is option now removed by #3789 because of assembly isolation

Describe the solution you'd like.

I would like a command that returns a cached or fresh (with -Fresh flag) access token as a secure string, so we can tell people to use that. And have that documented.
Maybe even with a way to specify the scopes, so it can also be used the get tokens for other applications.

$token = Get-MgAccessToken [[-Scope] ......] [-Fresh]
Additional context?

You're able to do:

  1. Fake request
  2. Return http response
  3. Read http request headers
  4. Extract token

Why not provide a way that just returns set token as a secure string?

Authentication is one of the most difficult things to grasp, being able to provide a way for users to just get an access token without tricks seems like a nice addition.

主要言語
C#
スター
901
フォーク
232
平均マージ
1日 9時間
マージ済み PR(30日)
22

環境構築

はじめの一歩

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

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

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

似ている issue

C# の issue をもっと見る

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

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