Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ce5fb0b
closes #10
PowershellScripts Feb 15, 2020
a8907a0
Create description.md
PowershellScripts Feb 15, 2020
59c1b80
Add files via upload
PowershellScripts Feb 15, 2020
1f89f7c
Create description.md
PowershellScripts Feb 15, 2020
6bce6ea
Add files via upload
PowershellScripts Feb 15, 2020
02489de
Create description.md
PowershellScripts Feb 15, 2020
ba3fe06
Add files via upload
PowershellScripts Feb 15, 2020
d09c729
Create description.md
PowershellScripts Feb 15, 2020
5020e1a
Add files via upload
PowershellScripts Feb 15, 2020
592357b
Rename description.md to readme.md
PowershellScripts Feb 15, 2020
046bfb8
Create description.md
PowershellScripts Feb 15, 2020
e75f20a
Create txt.txt
PowershellScripts Feb 15, 2020
7cbaf03
Add files via upload
PowershellScripts Feb 15, 2020
0a8d26d
Add files via upload
PowershellScripts Feb 15, 2020
4b904b0
Create description.md
PowershellScripts Feb 15, 2020
da66b85
Create txt.txt
PowershellScripts Feb 15, 2020
b280f3c
Add files via upload
PowershellScripts Feb 15, 2020
29e3780
Add files via upload
PowershellScripts Feb 15, 2020
a4a72bc
Create description.md
PowershellScripts Feb 15, 2020
072bdbd
Add files via upload
PowershellScripts Feb 15, 2020
0e76cf1
Create description.md
PowershellScripts Feb 15, 2020
1bcc3a3
Add files via upload
PowershellScripts Feb 15, 2020
03934e9
Create README.md
PowershellScripts Feb 15, 2020
0d39899
Add files via upload
PowershellScripts Feb 15, 2020
2686ebf
Create description.md
PowershellScripts Feb 15, 2020
f5255ac
Add files via upload
PowershellScripts Feb 15, 2020
b759fb5
Create description.md
PowershellScripts Feb 15, 2020
3fcbd6d
Add files via upload
PowershellScripts Feb 15, 2020
0c7cc88
Create description.md
PowershellScripts Feb 16, 2020
610d6a3
Add files via upload
PowershellScripts Feb 16, 2020
3b697f2
compatibility check
PowershellScripts Feb 16, 2020
d45528a
structure fixes
PowershellScripts Feb 16, 2020
ceb0945
Create description.md
PowershellScripts Feb 16, 2020
34996f0
Add files via upload
PowershellScripts Feb 16, 2020
8ff408e
Create description.md
PowershellScripts Feb 16, 2020
1d9e2f1
Add files via upload
PowershellScripts Feb 16, 2020
5cbf729
Create description.md
PowershellScripts Feb 16, 2020
ad32ba2
Add files via upload
PowershellScripts Feb 16, 2020
af8051d
Create description.md
PowershellScripts Feb 16, 2020
a55cce7
Add files via upload
PowershellScripts Feb 16, 2020
069645a
Create description.md
PowershellScripts Feb 16, 2020
0bf05ef
Add files via upload
PowershellScripts Feb 16, 2020
e81b98c
Create description.md
PowershellScripts Feb 16, 2020
df6f121
Add files via upload
PowershellScripts Feb 16, 2020
9030f8e
Update description.md
PowershellScripts Feb 16, 2020
f4aed4e
Create description.md
PowershellScripts Feb 16, 2020
7b44ded
Add files via upload
PowershellScripts Feb 16, 2020
a20992a
compatibility test
PowershellScripts Feb 16, 2020
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
  • Loading branch information
PowershellScripts authored Feb 15, 2020
commit 6bce6ea419348f4d98a95d6fc28f36c3e6f8bd52
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
function Get-SPOUserProperty
{
param (
[Parameter(Mandatory=$true,Position=1)]
[string]$Username,
[Parameter(Mandatory=$true,Position=2)]
$password,
[Parameter(Mandatory=$true,Position=3)]
[string] $url,
[Parameter(Mandatory=$true,Position=4)]
[string] $userLogin
)



$Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Username, $password)
$RestUrl=$url+"/_api/SP.UserProfiles.PeopleManager/GetPropertiesFor(accountName=@v)?@v='i:0%23.f|membership|"+$userLogin+"'"

$request = [System.Net.WebRequest]::Create($RESTUrl)
$request.Credentials = $Credentials
$request.Headers.Add("X-FORMS_BASED_AUTH_ACCEPTED", "f")
$request.Accept = "application/json;odata=verbose"
[Microsoft.PowerShell.Commands.WebRequestMethod]$Method = [Microsoft.PowerShell.Commands.WebRequestMethod]::Get
$request.Method=$Method
$response = $request.GetResponse()
$requestStream = $response.GetResponseStream()
$read = New-Object System.IO.StreamReader $requestStream
$data=$read.ReadToEnd()
$results = $data | ConvertFrom-Json



return ($results.d.userprofileproperties.results)








}









#Paths to SDK
Add-Type -Path "H:\Libraries\Microsoft.SharePoint.Client.dll"
Add-Type -Path "H:\Libraries\Microsoft.SharePoint.Client.Runtime.dll"


#Enter the data
$AdminPassword=Read-Host -Prompt "Enter password" -AsSecureString
$username="Admin@t321.onmicrosoft.com"
$Url="https://t321.sharepoint.com"
$userLogin="user2@t321.onmicrosoft.com"




Get-SPOUserProperty -Username $username -Url $Url -password $AdminPassword -userLogin $userLogin | select key, value