MCAS IP Range is not updating

Chetan Dev 26 Reputation points
2022-04-18T11:14:58.417+00:00
$updateipuri ="https://xxxxxxxxxxxx.usx.portal.cloudappsecurity.com/api/v1/subnet/<iprangeid>/update_rule/"  
$Body=@"  
{  
"name":"xxxxxx-ZscalerNetwork-AMER",  
"subnets" :[  
"192.168.1.0/24",  
"192.168.2.0/16"  
],  
"category" : 1,  
"tags" : "TrustedIPs"  
}  
"@  
$UpdateMCASAmer=Invoke-RestMethod -Method Post -Uri $updateipuri -Headers $Headers -Body $Body  

=============================================================================

We are trying to update a IP range of MCAS (Cloud App Security) using the Rest method. however, it is giving the below error message.

any suggetion?

Ref Link ; https://learn.microsoft.com/en-us/defender-cloud-apps/api-data-enrichment-update

Invoke-RestMethod : {"errors":[{"error":"A range with the same name already
exists.","errorMessageCode":"CONSOLE_IP_RULE_ERROR_DUPLICATE_NAME_FOR_THE_SUBNET_RULE"}]}
At line:1 char:1

  • Invoke-RestMethod -Method Post -Uri $updateipuri -Headers $Headers -B ...
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke
    -RestMethod], WebException
  • FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRe
    stMethodCommand
Windows 365 Enterprise
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lu Dai-MSFT 28,241 Reputation points
    2022-04-19T00:47:17.46+00:00

    @Chetan Dev Thanks for posting in our Q&A. For this issue, it is not related to windows 365. Windows 365 is a cloud-based service that automatically creates a new type of Windows virtual machine (Cloud PCs) for your end users. I'm not a support engineer of Microsoft Cloud App Security.

    To get more accurate help, it is suggested to contact Microsoft Defender for Cloud Apps support. Here is the support link:
    https://learn.microsoft.com/en-us/defender-cloud-apps/support-and-ts

    Thanks for your understanding and hope it will help.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments