DEV Community

tumit
tumit

Posted on

1 1

MS-Teams — ใส่รูป profileให้ guest

“อย่าให้งาน ทำให้การเล่นเสีย” ยังเป็นคติประจำใจ

เนื่องจากทีมที่ทำงานอยู่ใช้ MS-Teams ของลูกค้าเป็นช่องทางการติดต่อหลัก + role เราเป็น guest ทำให้ features ต่าง ๆ ได้มาไม่ครบ แต่เรื่องพวกนั้นก็ยังหาท่าหาทางไปได้ แต่สิ่งที่รู้สึกยอมไม่ได้ คือ ทำไมเราเปลี่ยนรูป profile เราไม่ได้ (ฟร่ะ)

ไม่ยอม อยากได้ ๆ

เริ่มจาก google เลยว่า guest ใน MS-Teams ถ้าอยากแก้รูป profile ทำไงได้บ้าง ใล่ ๆ ดูก็เจอคนที่อยากได้เหมือนกัน และไปพบว่าถ้าเราอัปเดตรูปบน AzureAD มันจะดึงมาเป็น MS-Teams profile ให้ ว่าแล้วเราก็เริ่มเลย

เปิด Power Shell ก่อนเลย (Run as administrator ด้วยนะ)

Run as administrator

และก็ install AzureAD PowerShell module เพื่อให้สามารถ connect AzureAD ผ่าน command ด้วยคำสั่ง

Install-Module AzureAD

จากนั้น connect ไปที่ AzureAD ที่เราเป็น guest อยู่ ประมาณนี้

Connect-AzureAD -TenantDomain xxxth.onmicrosoft.com

แล้วมันจะมี popup ให้เรา login ประมาณนี้ ~

ถ้า login สำเร็จมันจะขึ้นประมาณนี้

จากนั้นก็ใช่ command เพื่อ upload รูป profile ขึ้นไปไว้บน AzureAD โดยแทนที่ @ ใน email ด้วย _ และเพิ่ม #EXT#@ ตามด้วย domain ที่เรา login โดยไฟล์ใช้เป็น jpg หรือ png ~100kb

Set-AzureADUserThumbnailPhoto -ObjectId ‘your_mail.com#EXT#@xxxth.onmicrosoft.com’ -FilePath ‘c:\pic.jpg’

ทดสอบว่าไฟล์ไปไหม ถ้าขึ้นว่ามีก็ใช้ได้

Get-AzureADUserThumbnailPhoto -ObjectId ‘your_mail.com#EXT#@xxxth.onmicrosoft.com

ที่เหลือก็แค่รอว่าเหมือนไหร่ cache มันจะหมดอายุแล้วโหลดรูป profile ใหม่จาก AzureAD มาแทน หรือถ้าใจร้อนก็ไป clear cache ของ MS-Teams เอาครับ (กรณี Window ก็ %AppData%\Microsoft\Teams ) ของผมรอประมาณ 4–5 วัน แต่กว่าคนอื่นก็รอไปประมาณ 1 เดือน LoL

น้องตี๋ผู้ตกเป็นเหยื่อทดลอง

จบการเล่นซนแต่เพียงเท่านี้ (-/-)

Refs: https://eightwone.com/2021/04/11/change-teams-guest-profile-picture/

AWS Q Developer image

Your AI Code Assistant

Automate your code reviews. Catch bugs before your coworkers. Fix security issues in your code. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay