Closed miked1428 closed 2 years ago
We are seeing the same Get-PnPUserProfileProperty : Current user is not tenant administrator.
error running this PowerShell script in a global administrator account session. Did you find a solution, @miked1428?
Are you using an app identity or user identity? Please see here for a resolution https://helloitsliam.com/2022/04/05/get-pnpuserprofileproperty-current-user-is-not-a-tenant-administrator/
Thanks, @merill. We were able to eliminate the Get-PnPUserProfileProperty : Current user is not tenant administrator.
error by correcting the app permissions. However, we now get the error Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
when the script hits a user that has the attribute set.
Hi @KeithGillette or @merill I'm running some testing and the article does not talk about the steps to update/correct the permissions. Can you point me in the right direction? Also Liam does not mention if he is in admin or user context.
Hey CITWil,
In your Azure Active Directory console, look for "App Registrations". From there drill into your app and modify the API Permissions.
I'm getting an error that the current user in not a tenant administrator when running the Invoke-PronounSync.ps1 script. Also when it gets to a user that has the extension attribute set, it says updating even though it errors and doesn't update the field.
The account that is running the script is a global administrator