Comments on: Customizing the Microsoft 365 User Profile Card with the Microsoft Graph PowerShell SDK https://office365itpros.com/2023/11/15/user-profile-card-sdk/?utm_source=rss&utm_medium=rss&utm_campaign=user-profile-card-sdk Mastering Office 365 and Microsoft 365 Wed, 17 Jan 2024 22:13:17 +0000 hourly 1 By: Mike Park https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11769 Wed, 17 Jan 2024 22:13:17 +0000 https://office365itpros.com/?p=62444#comment-11769 . It was GA permission consent in one of our tenants that wasn't in the correct state. Thanks for taking the time to reply.]]> In reply to Tony Redmond.

Found the answer 👍. It was GA permission consent in one of our tenants that wasn’t in the correct state. Thanks for taking the time to reply.

]]>
By: Tony Redmond https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11762 Tue, 16 Jan 2024 22:08:59 +0000 https://office365itpros.com/?p=62444#comment-11762 In reply to Mike Park.

The documentation says that PeopleSettings.ReadWrite.All is all that’s needed as does the Graph documentation. Have you tried using a Graph request rather than the cmdlet (just in case).

]]>
By: Mike Park https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11759 Tue, 16 Jan 2024 15:58:44 +0000 https://office365itpros.com/?p=62444#comment-11759 Great article as always Tony!

I’m running into an issue with running the commands.

I’m running PS Graph SDK v2.11.1. I’ve tried in WPS (5.1) and PSC (7.4).
I’m a GA with a PIM’d role and have admin and user consent.
Scope was set to “Connect-MgGraph -Scopes “PeopleSettings.ReadWrite.All”,”PeopleSettings.Read.All” -NoWelcome”
Double checked with “(Get-MgContext).Scopes”and scopes are listed and presented, but I’m hitting a

Remove-MgAdminPeopleProfileCardProperty
Status: 403 (Forbidden)
UnknownError,Microsoft.Graph.PowerShell.Cmdlets.RemoveMgAdminPeopleProfileCardProperty_Delete

]]>
By: Magnus https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11578 Wed, 29 Nov 2023 12:41:23 +0000 https://office365itpros.com/?p=62444#comment-11578 It´s sad not more attributes are supported, like employeeid.

]]>
By: Tandy Wine https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11538 Wed, 15 Nov 2023 19:37:57 +0000 https://office365itpros.com/?p=62444#comment-11538 Yes, the scope says: Scopes : {ChannelSettings.Read.All, Directory.Read.All, openid, PeopleSettings.Read.All…}
But in looking at versions of modules, I had both the 2.9.0 and an older version of the Microsoft.Graph.Authentication. I had to force uninstall that version and restart powershell, and now I’ve run the command without an error. So “fingers-crossed,” I might have updated the profile cards.

Thanks so much Tony for your quick responses and attention to detail. I appreciate it!

]]>
By: Tony Redmond https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11537 Wed, 15 Nov 2023 19:09:43 +0000 https://office365itpros.com/?p=62444#comment-11537 In reply to Tandy Wine.

Run (Get-MgContext).Scopes just to make sure. Being a global admin doesn’t mean that the process has permissions to update the people card settings.

]]>
By: Tandy Wine https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11536 Wed, 15 Nov 2023 19:07:14 +0000 https://office365itpros.com/?p=62444#comment-11536 In reply to Tony Redmond.

I’m a global admin and using Powershell with my admin credentials. At some point while working on this I got a “Permissions requested” pop up that said “This app would like to: read and write tenant-wide people settings, Read tenant-wide people settings, View users’basic profile, maintain access to data you have given it access to. I selected “Consent on behalf of your organization.” So I should have permissions.

]]>
By: Tony Redmond https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11535 Wed, 15 Nov 2023 17:25:03 +0000 https://office365itpros.com/?p=62444#comment-11535 In reply to Tandy Wine.

Permissions? “PeopleSettings.ReadWrite.All”,”PeopleSettings.Read.All”

]]>
By: Tandy Wine https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11534 Wed, 15 Nov 2023 17:23:11 +0000 https://office365itpros.com/?p=62444#comment-11534 I believe I am at version 2.9.0. That’s what I see for the version when I use get-module for microsoft.graph.identity.directorymanagement. I did load az.accounts and connect and now I get a different error.

+ New-MgAdminPeopleProfileCardProperty -BodyParameter $AddPropertyDetai …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-MgAdminPeop…Property_Create], AggregateException
+ FullyQualifiedErrorId : System.AggregateException,Microsoft.Graph.PowerShell.Cmdlets.NewMgAdminPeopleProfileCardProperty_Create

]]>
By: Tony Redmond https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11533 Wed, 15 Nov 2023 15:29:11 +0000 https://office365itpros.com/?p=62444#comment-11533 In reply to Tandy Wine.

What version of the SDK are you using? The latest is V2.9 and that’s the one I use.

]]>
By: Tandy Wine https://office365itpros.com/2023/11/15/user-profile-card-sdk/#comment-11532 Wed, 15 Nov 2023 15:12:00 +0000 https://office365itpros.com/?p=62444#comment-11532 Thanks for this post. This would be helpful to us to surface some attributes on the profile card.

I’m trying it and get an error when I try the final step. Any thoughts on what is causing this?

New-MgAdminPeopleProfileCardProperty : The ‘New-MgAdminPeopleProfileCardProperty’ command was found in the module ‘Microsoft.Graph.Identity.DirectoryManagement’, but the module could not be loaded. For more information, run
‘Import-Module Microsoft.Graph.Identity.DirectoryManagement’.
At C:\Users\tandy\Farmers Alliance\M365 Admin & Governance – PowerShellScripts\Update-User-Profile-Cards.ps1:24 char:1
+ New-MgAdminPeopleProfileCardProperty -BodyParameter $AddPropertyDetai …
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-MgAdminPeopleProfileCardProperty:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule

]]>