Can't delete group by REST API

I use this URL for delete a group: https://graph.windows.net/<domain>/groups/<objectId>/?api-version=1.5 (ref: https://msdn.microsoft.com/en-us/library/azure/dn151608.aspx)
but I can't do it. I set full permission for application (I can create/update). How deleted group via REST Api?
This is requonse:
odata.error: 
code: "Authorization_RequestDenied"
message: 
lang: "en"
value: "Insufficient privileges to complete the operation."

Hi,
Are you using this link to delete the group
https://graph.windows.net/<domain>/groups/<objectId>/?api-version=1.5
the method states that it has used the date, not the version of API as mentioned below.
https://graph.windows.net/mytenantdomain/groups/<objectId>?api-version=2013-04-05
The Sample request also has the date, not the exact version of the API
DELETE https://graph.windows.net/contoso.onmicrosoft.com/groups/bc0001a2-5b96-4073-a5be-6b80528a17ad?api-version=2013-04-05
HTTP/1.1
Authorization: Bearer eyJ0eX ... FWSXfwtQ
Content-Type: application/json
Host: graph.windows.net
Hope this helps you.
Girish Prajwal

Similar Messages

  • How can I delete groups of emails from my gmail account?

    How can I delete groups of emails from my gmail account?

    Sign in to gMail web mail client > tick the boxes > click the trash can
    OR you could tell us what OS X version you have and what mail client you are using

  • How can I delete groups from my contacts?

    How can I delete groups from my contacts? There were three groups added when I was using the iPad on my computer at work and I do not need them know.

    iPhone User Guide

  • Delete Yammer Group through REST API

    Hi All,
    Is there any REST API from yammer which enables us to delete Yammer groups. We would just have to pass groupid(s) to the rest api url and my yammer groups should get deleted.
    I tried googling but could not find any. except these: https://www.yammer.com/api/v1/group_memberships.json?group_id=:4309911 which just deletes user from a group. Is there any rest api to delete the group itself ?
    Thanks in advance.
    Regards,
    Subhash S.

    Hi,
    According to your description, you want to delete a group in Yammer using the REST API endpoint of Yammer.
    As it is more relate to Yammer development, it would be more appropriate to ask for help in the corresponding forum, you will get more help and confirmed answers there:
    http://community.office365.com/en-us/w/yammer/default.aspx
    Thanks
    Best Regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • [Office365][Calendar][Event]How to get deleted event by REST API

     
    Structure of event:
          "Id": "AAMkAGI2NG...WRAAAAAA2hTfspaWRAAADTG93AAA=",
          "IsCancelled": false,
    Meaning of property "IsCancelled" is to distinguish between events that have been deleted or not, isnt it ?
    Last week I was able to get the event that has "IsCancelled" is true, but now i can get "IsCancelled" is false only. What is the cause of change?
    Can I use REST API to get the events that are already deleted? If ican, pls show me how to do!
    Thanks in advance !

    I dont think its possible to do it

  • Add user to sharepoint group using REST API

    I am trying to add a user to sharepoint group with following code
    serviceUrl= Appweb + "/_api/SP.AppContextSite(@target)/web/sitegroups("+GroupId+")/users?@target='host web'";
        $.ajax({
            url: serviceUrl,
            type: "POST",
            contentType: "application/json; charset=utf-8",
            dataType: 'json',
            body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|'+email }",
      headers: {"accept":"application/json;odata=verbose",
        "content-type": "application/json;odata=verbose",
        "X-RequestDigest":$("#__REQUESTDIGEST").val()
        async: false,
      success: function (data) {
               alert('success');
      error: function (data) {
                 alert('fail');
    The request goes to error function. Response of the request is Microsoft.SharePoint.Client.InvalidClientQueryException and message is A node of type 'EndOfInput' was read from the JSON reader when trying to read the start of an entry. A 'StartObject' node was
    expected
    I tried the sample from following link but fail it
    https://msdn.microsoft.com/en-us/library/office/dn531432.aspx

    Hi,
    Per my understanding, you might want to add an user to a SharePoint group in host web from a SharePoint Hosted App using REST API.
    Here is a working demo for your reference:
    var hostweburl;
    var appweburl;
    $(document).ready(function () {
    //Get the URI decoded URLs.
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    appweburl = decodeURIComponent(getQueryStringParameter("SPAppWebUrl"));
    // Resources are in URLs in the form:
    // web_url/_layouts/15/resource
    var scriptbase = hostweburl + "/_layouts/15/";
    // SP.RequestExecutor.js to make cross-domain requests
    $.getScript(scriptbase + "SP.RequestExecutor.js", loadPage);
    // Utilities
    // Retrieve a query string value.
    // For production purposes you may want to use a library to handle the query string.
    function getQueryStringParameter(paramToRetrieve)
    var params = document.URL.split("?")[1].split("&");
    for (var i = 0; i < params.length; i = i + 1)
    var singleParam = params[i].split("=");
    if (singleParam[0] == paramToRetrieve) return singleParam[1];
    function addUsersInGroup() {
    var executor;
    // Initialize the RequestExecutor with the app web URL.
    executor = new SP.RequestExecutor(appweburl);
    executor.executeAsync({
    url: appweburl + "/_api/SP.AppContextSite(@target)/web/sitegroups(8)/users?@target='" + hostweburl + "'",
    method: "POST",
    contentType: "application/json; charset=utf-8",
    dataType: 'json',
    body: "{'__metadata': { 'type': 'SP.User' },'LoginName':'i:0#.f|membership|[email protected]'}",
    headers: {
    "Accept": "application/json; odata=verbose",
    "content-type": "application/json;odata=verbose",
    "X-RequestDigest":$("#__REQUESTDIGEST").val()
    success: addUsersInGroupSuccessHandler,
    error: addUsersInGroupErrorHandler
    function addUsersInGroupSuccessHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    function addUsersInGroupErrorHandler(data)
    console.log(data);
    var jsonObject = JSON.parse(data.body);
    console.log(jsonObject);
    Thanks 
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected].

  • Can't delete groups in Address Book

    I have a couple of local groups in my Address Book that refuse to delete. Even though the "Delete Group" dialog pops up when I highlight the group and press the Delete-key, they are still there after hitting the OK button.
    When I create new groups (plus-button) I can delete them but not some of the old groups that were carried over from an older OS version.
    I have been playing around with Entourage and Outlook a lot so that might have had something to do with it.
    Is there a way to modify the Address Book database directly to get rid of these groups ?
    Or reinstall Address Book ?
    I already tried to swipe all Address Book related plist files - that didn't do it.

    Ok, I have solved the problem: I had to reset my SyncServices folder.
    Here's the description: http://support.apple.com/kb/ts1627
    After that I was finally able to delete the unwanted groups.

  • Assigning permission to SharePoint 2013 group using REST API

    Hi All,
    I was trying to assign permission to a group using REST but it failing with error message "Bad Request". Below is my REST code to assign Contribute permission to group with ID 95, It would great help if someone can help me to fix this.
    // Set permission on a specific group
    $.ajax({
    url: "<Site URL>/_api/web/roleassignments/addroleassignment(principalid=95, roledefid=1073741827)",
    type: "POST",
    contentType: "application/json;odata=verbose",
    headers: { "Accept": "application/json; odata=verbose","X-RequestDigest": $("#__REQUESTDIGEST").val(),"X-HTTP-Method": "POST" },
    success: function (data) {
    // Returning the results
    alert('Contribute permission set on group');
    alert("Error: " + JSON.stringify(data));
    error: function (data) {
    alert("Error: " + JSON.stringify(data));
    ~Harish

    Hi Harish,
    I have same problem and I just find solution for this error.
    You must set body/data to null value --> It's work for me  !!! :)
    See my code with RequestExecutor (I develop an SharePoint App)
    // Set the new role assignment for the group on the list.
            this.setNewRoleForGroup = function (listTitle, newRoleDefId, groupId) {
                var deferred = $.Deferred();
                //First we must call the EnsureSetup method
                JSRequest.EnsureSetup();
                var hostweburl = decodeURIComponent(JSRequest.QueryString["SPHostUrl"]);
                var appweburl = decodeURIComponent(JSRequest.QueryString["SPAppWebUrl"]);
                //Tip to have a title formated to REST call
                var arrayTitle = decodeURIComponent(listTitle).split("'");
                var restQueryUrl = appweburl + "/_api/SP.AppContextSite(@target)/web/lists/GetByTitle('" + arrayTitle.join("''") + "')/roleassignments/addroleassignment(principalid=" + groupId + ",roledefid=" + newRoleDefId + ")?@target='" + hostweburl + "'";
                var executor = new SP.RequestExecutor(appweburl);
                executor.executeAsync({
                    url: restQueryUrl,
                    body: null,
                    method: "POST",
                    headers: {
                        "Content-Type": "application/json;odata=verbose",
                        "Accept": "application/json; odata=verbose",
                        "X-HTTP-Method": "POST"
                    success: function (data, textStatus, xhr) {
                        deferred.resolve({ updated: true });
                    error: function (xhr, textStatus, errorThrown) {
                        deferred.reject(JSON.parse(xhr.body).error.message.value);
                return deferred;

  • Can't delete group of emails at once.

    When I click on Mail on my IPad2, I used to click on Inbox and could open both of my mail accounts. Now, I only get the Inbox for one of my accounts (all the Inbox button does is open and close the list of emails in one account). Also, in the column that opens on the left, listing each email, there is no longer a "delete" option.  I have to open each individual email to delete it.
    Is there a bug in the update?  How do I resolve this?

    No, it's one at a time, then you can delete all once in trash.

  • Network Security Groups REST API

    HI,
    according to this link:
    http://azure.microsoft.com/blog/2014/11/04/network-security-groups/
    Network Security groups is currently exposed only through power shell and REST API.
    I can't find any REST API documentations.
    any idea?

    Hi,
    You are correct. There is no offical article related to Network Security Group with REST API as Network Security Group is a new feature. I will report it to the related team and hope the related articles would be published quickly. In addition, you can also
    submit your requirement in Azure feedback:
    http://feedback.azure.com/forums/34192--general-feedback
    Apprecite your patience.
    Best regards,
    Susie
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How to filter the Rest Api data based on Taxanomy columns

    Hi Everyone,
    We are using SharePoint2010 Standard Edition.
    I wanted get the library details through REST Api. I am using as below:
    https://SiteUrl/_vti_bin/listdata.svc/Documents?$filter=Title eq 'SharePointDoc'
    Here I am able to get the info regarding "SharePointDoc". But when I am trying to get the details from Taxonomy filter, it didn't.
    Can anyone please tell me how can we filter based on Taxanomy fields.
    Thanks in Advance
    Krishnasandeep

    Hi,
    I understand that you wanted to filter the Rest Api data based on Taxanomy columns.
    Per my knowledge, in SharePoint 2010 , not all types of column are available via REST, most annoyingly managed metadata columns are amongst this group of unsupported column types.
    However, in SharePoint 2013, we can filter list items based on taxonomy (managed metadata) columns.
    Taxonomy fields can be now called via REST API using CAML query in REST calls.
    Here is a great blog for your reference:
    http://www.cleverworkarounds.com/2013/09/23/how-to-filter-on-a-managed-metadata-column-via-rest-in-sharepoint-2013/comment-page-1/
    You’d better to change the REST calls and the CAML query to check whether it works in SharePoint 2010.
    More information:
    http://platinumdogs.me/2013/03/14/sharepoint-adventures-with-the-rest-api-part-1/
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to use WebCenter REST API to like or comment a activity

    Hi all
    I want to know how to realize like or comment function with REST APIs.
    I execute a REST call with following url, but the 'like' counter is not be increased.
    http://cdcjp77vm3.cn.oracle.com:8888/rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/(s2518c69b_1989_4a63_8886_c32075c76b9c)/likes?&utoken=FDNA-Z7ekZuPnVSNoPWOqTJ2IzAE_w**
    Is there anything i missed?
    Can anyone give me an example about how to use this API to like or comment a activity?
    Thanks
    Qian

    So Qian;
    looking through the code this is how you can
    Post a comment (POST)
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
    {key:val}
    {text:'this is my comment)
    Edit a comment (PUT)
    So I haven't tried it but it should do the trick.. although I don't see update under capabilities so you may get blocked.
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/comments?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
        id: {commentId},
        text: 'changed my comment.. magic'
    Delete a comment (DELETE)
    /rest/api/activities/services/{serviceId}/objectTypes/groupSpace/objects/({objectId})/comments/{commentId}?utoken=blah
    Like POST
    /rest/api/activities/services/{serviceId}/objectTypes/{objectType}/objects/({objectId})/likes?startIndex={startIndex}&itemsPerPage={itemsPerPage}&utoken=blah
    I passed it an empty object {} seemed to work for me.
    Unlike (DELETE)
    /rest/api/activities/services/oracle.webcenter.community/objectTypes/groupSpace/objects/({objectId})/likes/({likeId})?utoken=blah
    Let me know if this works for you

  • Determine Email of the person in the people field using JSOM or REST API

    Hi,I have to build below HTML dynamically. The source to build this is a sharepoint list that has a people field in it.Can I use JSOM or REST API to do this? if so, can anyone help with some examples?<a href='mailto:[email protected],[email protected]'>Write email</a>
    techie

    Hi,
    The following code for your reference:
    <script src="http://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(function () {
    var array=new Array();
    var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('CustomList')/items?$select=EmployeeId";
    // execute AJAX request
    $.ajax({
    url: requestUri,
    type: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" },
    success: function (data) {
    var dataResults = data.d.results;
    for(var i=0;i<dataResults.length;i++){
    if(dataResults[i].EmployeeId!=null){
    for(var j=0;j<dataResults[i].EmployeeId.results.length;j++){
    array.push(dataResults[i].EmployeeId.results[j]);
    //remove the duplicated id
    var employeeIds=$.unique(array);
    //get the employee email by user id
    var emails=getEmailsByIDs(employeeIds);
    //add to send mail div
    $("#SendMail").append("<a href='mailto:"+emails+"'>Send Email</a>");
    error: function () {
    //console.log("Failed to get details");
    function getEmailsByIDs(employeeIds){
    var emails=new Array();
    var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/siteusers?$select=Id,Email";
    // execute AJAX request
    $.ajax({
    url: requestUri,
    type: "GET",
    headers: { "ACCEPT": "application/json;odata=verbose" },
    async: false,
    success: function (data) {
    var dataResults=data.d.results;
    for(var i=0;i<dataResults.length;i++){
    for(var j=0;j<employeeIds.length;j++){
    if(dataResults[i].Id!=null&&dataResults[i].Id==employeeIds[j]&&dataResults[i].Email!=null){
    emails.push(dataResults[i].Email);
    error: function () {
    //console.log("Failed to get details");
    return emails;
    </script>
    <div id="SendMail">
    </div>
    Thanks,
    Dennis Guo
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Dennis Guo
    TechNet Community Support

  • Problem when selecting PublishingRollupImage using REST API using Javascript ?

    Hii Guys,
    I am developing  a listing page of News using REST, the custom list contains Title, PublishingRollupImage, and other fields which is provided in the $select
    http://xyz/_api/web/lists/getbytitle('News')/Items?$select=Title,Link,PublishingRollupImage
    the column "PublishingRollupImage" is there and i can return the result by using normal JavaScript API with CAML query.
    but REST calling while specifying this column is failing with this error
    The field or property 'PublishingRollupImage' does not exist
    Microsoft.SharePoint.Client.InvalidClientQueryException
    please note that this is not the (hyperlink/image) field,
    its an existing site columns (publishing image)

    Hi,
    According to your post, my understanding is that you want to get Rollup Image data using REST API.
    Per my knowledge, we can’t get it using REST API.
    We can use Client Object Model to achieve it, the following code snippet for your reference:
    var ctx = new SP.ClientContext();
    var items = ctx.get_web().get_lists().getByTitle('Pages').getItems(new SP.CamlQuery());
    ctx.load(items);
    ctx.executeQueryAsync(function() {
    // Get the first items rollup image, just as an example
    var rollupImage = items.getItemAtIndex(0).get_item('PublishingRollupImage');
    console.log(rollupImage);
    If you still want to use the REST API, we can customize a We Service to achieve it.
    http://sharepointlearningcurve.blogspot.in/2013/08/creating-wcf-rest-service-for.html
    Here is a similar thread for you to take a look:
    http://sharepoint.stackexchange.com/questions/46844/how-to-get-publishingrollupimage-for-page-in-page-library-with-rest-and-jquery
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How can I access user permission for specific items in Sharepoint 2013 via REST API?

    I want to access user permissions for specific items like lists, documents, folders etc. via the REST API.
    Currently I am hitting the following endpoint:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/getUserEffectivePermissions('win-5a8pp4v402g\\Sharepoint User 2')
    However the response looks like this:
       "d":
           "GetUserEffectivePermissions":
               "__metadata":
                   "type": "SP.BasePermissions"
               "High": "0",
               "Low": "0"
    I cant understand why high and low are both 0? I have added the user to a specific group. Also this is the same result for each of the users. Another thing to note is that I havent added the "Guest" user in the sharepoint server. So when I hit the endpoint for the Guest user, it still shows the same response. So I know there is something I am doing wrong.I want to access permission of a user for a specific item, say a document using the REST API. Can someone tell me how? What would be the endpoint?

    Thanks for the reply. Although this works for Lists, I need to get permissions of documents too. Here is what I have tried:
    http://win-5a8pp4v402g/sharepoint_test/site_1/_api/web/GetFileByServerRelativeUrl('/sharepoint_test/site_1/Documents/file1.txt')/GetUserEffectivePermissions(@user)?@user='i%3A0%23%2Ew%7Cwin-5a8pp4v402g%5Csharepoint%20user%201'
    And the response is:
       "error":
           "code": "-1, Microsoft.SharePoint.Client.ResourceNotFoundException",
           "message":
               "lang": "en-US",
               "value": "Cannot find resource for the request GetUserEffectivePermissions."
    Clearly this doesnt work for a file. Whats wrong?

Maybe you are looking for

  • "The Ipod cannot be updated. The file or directory is corrupted and..

    ..unreadable" what does this mean?? i can't add new songs.

  • HT201343 AirPlay Mirroring. The ATV3 screen goes black.

    When my mid MBP 2011 connects via AirPlay Mirroring. Mountain Lion.  The screen goes black. It has worked before. Now it doesn't.  I checked firewall, graphics switching and rebooting all devices. Streaming via iTunes works fine. ATV3 can access my M

  • Can't get mouse wheel working

    I'm using a PS/2 wheel mouse, but unfortunately the wheel doesn't seem to get recognized. here is part of my my xorg.conf file. Section "InputDevice" # Identifier and driver Identifier "Mouse1" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "

  • PL/SQL LOOP or INSERT MONTH

    I have a table below that has START_DATE and END_DATE for each record but not individual row for each month. So, a record can have 6 months payment with start date - '20100101' to end_date 20100630. I need to find out payment for each month for recon

  • Modifying database link at runtime

    Hi, I have a mapping that collects audit information from and oracle database. The mapping is designed to run against any Oracle DB, so I'd like to do something like this: 1) set db link to point to a particular database 2) run the mapping (actually