"Hi there! It looks like the permissions in the Scope need a little adjustment. Currently, you have 'PeopleSettings.Read.All', but you'll need both 'PeopleSettings.ReadWrite.All' and 'PeopleSettings.Read.All'. Could you please update the Scope permissions and give it another try? Thanks!"
Microsoft Graph PowerShell: unable to retrieve or remove properties from profile card
Hello to all of the community,
I was requested to hide an attribute from the profile card for an organization (specifically the "Fax" attribute). So I tried using the Microsoft Graph PowerShell SDK to first list all of the attributes, using the cmdlet Get-MgAdminPeopleProfileCardProperty so that I can get the directoryPropertyName to then remove it by using the cmdlet Remove-MgAdminPeopleProfileCardProperty. Ref: https://learn.microsoft.com/en-us/graph/add-properties-profilecard
The problem is that Get-MgAdminPeopleProfileCardProperty returns nothing:
And if i try to remove the property, it fails with an error saying that the property doesn't exist:
I tried using the REST API, also with the same results.
Just so it's clear. the property "Fax" does show up when looking at the profile card of a user (in fact there are more properties, that should be returned by the cmdlet Get-MgAdminPeopleProfileCardProperty). The attribute shows up in both desktop clients and cloud apps.
Any help as to why this is happening (and how to resolve it) is appreciated.
Thanks.
Edit 1: I tried using both "PeopleSettings.Read.All" and "PeopleSettings.ReadWrite.All" as suggested by Robert in the comments, but the results are the same:
1 answer
Sort by: Most helpful
-
Robert Spilman 0 Reputation points Microsoft Employee
2025-01-10T15:03:42.22+00:00