Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Supported way to get the token

Offen
#3,806 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
csharp, powershell
Bereich
api, authentication

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.

Vorherrschende Sprache
C#
Sterne
901
Forks
232
Ø Merge
1 T. 9 Std.
Gemergte PRs (30 T.)
22

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus microsoftgraph/msgraph-sdk-powershell

Alle Issues in microsoftgraph/msgraph-sdk-powershell

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.