Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save expiscornovus/c80c6a8cfec05f5207873e9c855b543d to your computer and use it in GitHub Desktop.
Save expiscornovus/c80c6a8cfec05f5207873e9c855b543d to your computer and use it in GitHub Desktop.
Remove User from SharePoint Group by LoginName
{"id":"43f11978-1cde-4d71-80d2-d1728b895ff7","brandColor":"#036C70","connectionReferences":{"shared_office365users":{"connection":{"id":"/crca4_sharedoffice365users_8b60b"}},"shared_sharepointonline":{"connection":{"id":"/exp_sharedsharepointonline_e5efa"}}},"connectorDisplayName":"SharePoint","icon":"https://connectoricons-prod.azureedge.net/u/jayawan/releases/v1.0.1697/1.0.1697.3786/sharepointonline/icon.png","isTrigger":false,"operationName":"Send_an_HTTP_request_to_SharePoint","operationDefinition":{"type":"OpenApiConnection","inputs":{"host":{"connectionName":"shared_sharepointonline","operationId":"HttpRequest","apiId":"/providers/Microsoft.PowerApps/apis/shared_sharepointonline"},"parameters":{"dataset":"@parameters('SPOSiteCollection_PowerUsers (exp_SPOSiteCollection_PowerUsers)')","parameters/method":"POST","parameters/uri":"_api/web/sitegroups/getbyname('Custom SharePoint Group')/users/removeByLoginName('@{encodeUriComponent(concat('i:0#.f|membership|',outputs('Get_user_profile_(V2)')?['body/mail']))}')","parameters/headers":{"Accept":"application/json;odata=verbose","Content-Type":"application/json;odata=verbose"}},"authentication":{"type":"Raw","value":"@json(decodeBase64(triggerOutputs().headers['X-MS-APIM-Tokens']))['$ConnectionKey']"}},"runAfter":{"Get_user_profile_(V2)":["Succeeded"]},"metadata":{"operationMetadataId":"7fe42304-ae02-428f-bea0-8c261757fbb1"}}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment