Jump to content
call911

Caut programator python sau c#

Recommended Posts

  • Active Members
Posted

Also, din cate stiu eu, pozele sunt stocate in AD (Active Directory). Ca idee, asa ar arata in Powershell:

 

Set-ADUser user_1 -Replace @{thumbnailPhoto=([byte[]](Get-Content "C:\ps\user_1_photo.jpg" -Encoding byte))}

 

  • Upvote 3
Posted

Partea mai complicata nu e cea in care se scrie un programel care face asta, ci aflarea unei metode simple de schimbare. 

Daca e vorba de outlook.com de exemplu, trebuie vazut cum se poate face login (sa nu fie vorba de un captcha acolo) cum se pastreaza sesiunea si ce request e necesar pentru schimbarea pozei. Daca se stiu aceste lucruri se poate face in 2 linii de bash cu curl si grep.

  • Upvote 2
Posted
3 hours ago, Nytro said:

Partea mai complicata nu e cea in care se scrie un programel care face asta, ci aflarea unei metode simple de schimbare. 

Daca e vorba de outlook.com de exemplu, trebuie vazut cum se poate face login (sa nu fie vorba de un captcha acolo) cum se pastreaza sesiunea si ce request e necesar pentru schimbarea pozei. Daca se stiu aceste lucruri se poate face in 2 linii de bash cu curl si grep.

Outlook are oauth2 login

  • Upvote 1
Posted (edited)
On 10/1/2020 at 12:55 PM, gigiRoman said:

Outlook are oauth2 login

Conturile sunt ale mele, daca le conectez din aceiasi sursa nu cred ca o sa fie asta o problema.

Edited by call911
Posted

Sursa: https://docs.microsoft.com/en-us/previous-versions/office/office-365-api/api/version-2.0/photo-rest-operations

 

Ia d-aci, iti poate face oricine in orice limbaj. Chiar si cURL.

Set user photo

Assign a photo to the signed-in user. The photo should be in binary. It replaces any existing photo for that user.

You can use either PATCH or PUT for this operation in version 2.0.

Required scope

Use the following scope to set the photo of the signed-in user:

  • user.readwrite
 
PATCH https://outlook.office.com/api/v2.0/me/photo/$value
PATCH https://outlook.office.com/api/v2.0/users('{user_id}')/photo/$value

PUT https://outlook.office.com/api/v2.0/me/photo/$value
PUT https://outlook.office.com/api/v2.0/users('{user_id}')/photo/$value
Required scope
Optional parameter Type Description
Url parameters    
user_id string The user's email address.

Sample request

 
PATCH https://outlook.office.com/api/v2.0/me/photo/$value
Content-Type: image/jpeg

Include the binary data of the photo in the request body.

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...