Hi@Vasil Michev I was tryingn to use Graph API - and almost got it. The problem is that via Graph Explorer I am able to renew the group by using POST groups/{groupid}/renew command - it works great, but when trying to do the same with PowerShell using this command:
Invoke-RestMethod -Uri 'https://graph.windows.net/<domain>.onmicrosoft.com/groups/8c8dce4c-9e61-4617-b111-22073d5f6d39/renew...' -Headers $GraphToken -Method POST
I got:
Invoke-RestMethod : {"odata.error":{"code":"Request_BadRequest","message":{"lang":"en","value":"Specified HTTP method is not allowed for the request target."},"requestId":"0b54628a-8859-4c01-ae51-43db84dgf4c0","date":"2019-07-02T13:18:24"}}
At line:1 char:1
+ Invoke-RestMethod -Uri 'https://graph.windows.net/<domain>.onmicrosoft.co ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
According to documentation it should work, and it does - using graph explorer on web browser, from some reason it does not work however via powershell.
Was fighting for whole days today - no progress..