microsoftgraph / microsoftgraph/entra-powershell

Connect-Entra seems to give more Scopes than requested.

Open
#947 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

documentation P2 ToTriage Triaged
Dominant language
PowerShell
Stars
213
Forks
46
PR merge metrics
No merged PRs in 30d

Description

Describe the bug
If I start a brand new PS console and connect using for example the Scope Group.Read.All...
Connect-Entra -TenantId xxxx -Scopes Group.Read.All

And then look at my Context using
(Get-EntraContext).Scopes
it will show all available scopes assigned to the Enterprise Application
Example...
![image](https://github.com/user-attachments/assets/1edfa930-1009-46cf-ae77-1b2177142255

I would expect the Context to only show the "Active" Context.Scopes I currently have available in the session.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in a fresh PowerShell console and reproduce the issue with Connect-Entra -TenantId xxxx -Scopes Group.Read.All, then inspect (Get-EntraContext).Scopes. Compare the requested scope with the scopes reported in the context; done when the context reports only the active scopes available in the session.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
authentication
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.