-
Notifications
You must be signed in to change notification settings - Fork 181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue reported on #2338 is still an issue, please reopen. #3181
Comments
Is this with an interactive (delegated) session or with an app-only session? Any time I go near OneDrive, I use app-only mode to be sure that application permissions will work. Get-MgUserDrive works very well in this mode. When you run a delegated session, your permissions won't allow access to someone else's OneDrive unless you are a manager of that drive. |
After reviewing the end-point documentation, I was coming here to close this issue. It was delegated vs. App-only issue. |
Thank you, @12Knocksinna, for your insight and for shedding light on the solution! |
Anything to get some of the bugs closed...
From: Steve Mutungi ***@***.***>
Sent: Tuesday, February 25, 2025 6:07 PM
To: microsoftgraph/msgraph-sdk-powershell ***@***.***>
Cc: 12 Knocksinna (Gmail) ***@***.***>; Mention ***@***.***>
Subject: Re: [microsoftgraph/msgraph-sdk-powershell] Issue reported on #2338 is still an issue, please reopen. (Issue #3181)
Thank you, @12Knocksinna<https://github.com/12Knocksinna>, for your insight and for shedding light on the solution!
-
Reply to this email directly, view it on GitHub<#3181 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AK45CIXTVCFFAAWRXHM7MFL2RSWKTAVCNFSM6AAAAABX25374GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBSHA4DEOJZGI>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
[SteveMutungi254]SteveMutungi254 left a comment (microsoftgraph/msgraph-sdk-powershell#3181)<#3181 (comment)>
Thank you, @12Knocksinna<https://github.com/12Knocksinna>, for your insight and for shedding light on the solution!
-
Reply to this email directly, view it on GitHub<#3181 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AK45CIXTVCFFAAWRXHM7MFL2RSWKTAVCNFSM6AAAAABX25374GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMOBSHA4DEOJZGI>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
|
Describe the bug
Get-MgUserDefaultDrive still not working, please refer to #2338 for details. Get-MgUserDefaultDrive -UserId XXXXXXXXX returns access denied when neccesary scopes are in place.
Expected behavior
Get-MgUserDefaultDrive still not working, please refer to #2338 for details.
How to reproduce
Get-MgUserDefaultDrive -UserId XXXXXXXXX returns access denied when neccesary permissions are in place.
SDK Version
2.26.0
Latest version known to work for scenario above?
No response
Known Workarounds
N/A
Debug output
DEBUG: [CmdletBeginProcessing]: - Get-MgUserDefaultDrive begin processing with parameterSet 'Get'.
DEBUG: [Authentication]: - AuthType: 'Delegated', TokenCredentialType: 'InteractiveBrowser', ContextScope: 'CurrentUser', AppName: 'Microsoft Graph Command Line Tools'.
DEBUG: [Authentication]: - Scopes: [DeviceManagementConfiguration.Read.All, Directory.Read.All, Directory.ReadWrite.All, Files.Read.All, Group.Read.All, Mail.Read, openid, profile, Reports.Read.All, Sites.Read.All, Team.ReadBasic.All, User.Read, User.Read.All, email, Sites.ReadWrite.All].
DEBUG: ============================ HTTP REQUEST ============================
HTTP Method:
GET
Absolute Uri:
https://graph.microsoft.com/v1.0/users/staffXXXXXXXXXXX.com/drive
Headers:
FeatureFlag : 00000003
Cache-Control : no-store, no-cache
User-Agent : Mozilla/5.0,(Windows NT 10.0; Microsoft Windows 10.0.22631; en-US),PowerShell/7.4.4
SdkVersion : graph-powershell/2.26.0
client-request-id : 061dd456-4084-4270-9d92-da93956779ab
Accept-Encoding : gzip,deflate,br
Body:
DEBUG: ============================ HTTP RESPONSE ============================
Status Code:
Forbidden
Headers:
Cache-Control : no-store, no-cache
Vary : Accept-Encoding
Strict-Transport-Security : max-age=31536000
request-id : bff41ce0-adc0-43f1-9af2-13b28a809d9a
client-request-id : 061dd456-4084-4270-9d92-da93956779ab
x-ms-ags-diagnostic : {"ServerInfo":{"DataCenter":"South Central US","Slice":"E","Ring":"5","ScaleUnit":"000","RoleInstance":"SA2PEPF00002DF4"}}
Date : Tue, 25 Feb 2025 15:29:48 GMT
Body:
{
"error": {
"code": "accessDenied",
"message": "Access denied",
"innerError": {
"date": "2025-02-25T15:29:48",
"request-id": "bff41ce0-adc0-43f1-9af2-13b28a809d9a",
"client-request-id": "061dd456-4084-4270-9d92-da93956779ab"
}
}
}
Configuration
x64, Windows 11.
Other information
No response
The text was updated successfully, but these errors were encountered: