Response status code does not indicate success: Unauthorized (Unauthorized)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- powershell
- Domain
- api, authentication
Research direction
Start by reproducing the Get-WindowsBackup flow shown in the issue and compare its Microsoft Graph request with the same request in Graph Explorer. Check which request returns Unauthorized and whether the listed scopes are accepted for it; done means identifying the missing permission or request issue and documenting the required correction.
Written by the indexing model from the issue text.
Description
Does this work for anyone?
I get:
PS C:\Users\giggedy> Get-WindowsBackup
[1/4] PowerShell 7.6.5 detected.
[2/4] Microsoft.Graph.Authentication module present.
Enter the user UPN to view (or press Enter to view your own backup):
[3/4] Signing in to Microsoft Graph...
Signed in as admin_xxxx@xxxx.onmicrosoft.com.
[4/4] Reading backup for 'admin_xxxx@xxxx.onmicrosoft.com'...
Could not read backup for 'admin_xxxx@xxxx.onmicrosoft.com': Response status code does not indicate success: Unauthorized (Unauthorized).
I believe my permissions should be sufficient. I'm a Global Admin, and these are my scopes:
PS C:\Users\giggedy> (Get-MgContext).Scopes | Sort-Object
Application.ReadWrite.All
email
openid
profile
User.Read
User.Read.All
User.ReadWrite.All
UserWindowsSettings.Read
UserWindowsSettings.Read.All
UserWindowsSettings.ReadWrite.All
I get the same error when I try the request in Graph Explorer:
What am I doing wrong?
- Dominant language
- PowerShell
- Stars
- 8
- Forks
- 2
- Avg merge
- 5m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Similar issues
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
AXERA-TECH/ax-llm#77 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
games-on-whales/wolf#509 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100