Last active
September 20, 2017 19:17
-
-
Save jdmills-edu/17fe4410bfe3f31236bd5068b4f812e4 to your computer and use it in GitHub Desktop.
A PowerShell script that retrieves Dropbox Business Team Member information for a given email address.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[Parameter(Mandatory=$true)][String]$emailAddress | |
) | |
#API token from https://www.dropbox.com/developers/apps | |
$token = 'Bearer YourTeamMemberInformationAppTokenHere' | |
$body = '{"members":[{".tag":"email","email":"'+$emailAddress+'"}]}' | |
$headers = @{ | |
Authorization = $token | |
} | |
$response = Invoke-RestMethod -Uri "https://api.dropboxapi.com/2/team/members/get_info" -Method Post -ContentType "application/json; charset=utf-8" -Body $body -Headers $headers | |
return $response.profile |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example return: