Merill Fernando

Results 16 comments of Merill Fernando

Does this happen for every user that needs an update or for just a subset of the users?

Please see this issue. Are your users synced from on-prem? https://github.com/merill/m365-gender-pronoun-kit/issues/6#issuecomment-1173610409

Can you change line 46 to include a -Debug and try running again? That should hopefully provide some additional info on why it is failing. ```powershell $result = Invoke-MgGraphRequest -Uri...

When you used PnPConnect did you connect with the url to SharePoint admin? E.g. $AdminCenterURL = "https://crescent-admin.sharepoint.com" #Connect to Tenant Admin Connect-PnPOnline -URL $AdminCenterURL

Looks like a permission issue. Do you have access to the SharePoint tenant admin? See https://pnp.github.io/powershell/cmdlets/Get-PnPUserProfileProperty.html

Are you connecting to the nnnnn-admin.sharepoint.com site when calling Connect-PnPOnline?

Does this happen with all users or just some? BTW Are your users synced from on-prem AD or are these cloud users?

Ah, got it. So the script to update the extension attribute in Azure AD will only work for cloud users. If your users are synced from on-prem you will need...

You can comment out lines 54-59 (which updates AAD) and instead use the Set-ADUser.

This is excellent @CabbageandBean. Thanks a lot for sharing! Would you like to submit a PR to add this script to the repository?