Supported way to get the token
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 45/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- csharp, powershell
- 领域
- api, authentication
调研方向
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 内容生成。
描述
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:
- Fake request
- Return http response
- Read http request headers
- 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 小时
- 30 天内合并 PR
- 22
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-sdk-powershell 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
维护者通常 1 天内回复
-
status:waiting-for-triage type:bug
难度 2/5 1-3 小时 新手友好度 78/100
microsoftgraph/msgraph-sdk-powershell#3751 ·
维护者通常 1 天内回复
-
status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 25/100
microsoftgraph/msgraph-sdk-powershell#3805 · 2 条评论 ·
维护者通常 1 天内回复
-
status:waiting-for-triage type:bug
难度 3/5 1-2 天 新手友好度 72/100
microsoftgraph/msgraph-sdk-powershell#3772 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 48/100
microsoftgraph/msgraph-sdk-powershell#3749 ·
维护者通常 1 天内回复
查看 microsoftgraph/msgraph-sdk-powershell 的全部 Issue
相似的 Issue
-
Money Exploits未关闭S: Untriaged
难度 2/5 1-3 小时 新手友好度 62/100
project-wayfarer/wayfarer-14#1628 ·
维护者通常 3 天内回复
-
:watch: Not Triaged dotnet-target-version
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
copilot documentation
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 2 天内回复
-
untriaged
难度 2/5 1-3 小时 新手友好度 86/100
dotnet/dotnet-api-docs#13124 ·
维护者通常 1 天内回复
-
agentic-workflows
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复