Closed tudders closed 4 years ago
Some searching yielded: https://stackoverflow.com/questions/57343882/current-user-for-apps-in-microsoft-onedrive-api
The auth flow doesn't work for '/me' when '/me' is someone else.
(But I think this used to work??)
@tudders For example, you can access a user ID from the Drive owner property: https://github.com/krizalys/onedrive-php-sdk/blob/2.6.0/test/functional/ClientTest.php#L144
If you are the administrator of an organization, you can use the Graph to list users in the organization and get their IDs.
Apart from this scenario, by design, you will not easily be able to access other user information, for security reasons.
With this library, the recommended way to upload to a 3rd party account is as follows:
Hi there. Is there a way to get the id/UPN for a user in this library so I can push files into 3rd party folders?
There's a method here that points towards it, but I can't see where I can get the ID : getDriveByUser($idOrUserPrincipalName)
A 3rd party authenticates, but how to put stuff in their folders?
Note - client ID is not the $idOrUserPrincipleName. It's the app ID.