Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape # characters in UPN for graph user requests #1523

Merged
merged 4 commits into from
Jan 27, 2022

Conversation

reusto
Copy link
Contributor

@reusto reusto commented Jan 13, 2022

Type

  • Bug Fix
  • New Feature
  • Sample

Related Issues?

Can't add or remove guest users to Groups and Teams with the following PnP commands:

  • Add-PnPMicrosoft365GroupMember
  • Remove-PnPMicrosoft365GroupMember
  • Add-PnPTeamsUser
  • Remove-PnPTeamsUser

This is related to the character # being used in the UPN for guest users in Azure AD and this being a special character in URLs as well.

What is in this Pull Request ?

Escape # character in requests to the graph user API when UPN is a possible user input.

Used documentation for the user graph API as reference for recommended action: https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http#http-request

@KoenZomers
Copy link
Collaborator

Thanks for your contribution @reusto !

@KoenZomers KoenZomers merged commit edc4d7d into pnp:dev Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants