There are several cmdlets that are not compatible with CBA, see MC1131771 or the documentation link in the Automation running outside Azure section.
How do you run these cmdlets if credential-based authentication is deprecated?
I've tried moving our automated purge scripts to graph but never got the actual purge to work:
- Creating the case works: case = graph.post('security/cases/ediscoveryCases', body=body)
Creating the search works: search = graph.post('security/cases/ediscoveryCases/{}/searches'.format(case['id']), body=body)
- Starting the search works: startsearch = graph.post("security/cases/ediscoveryCases/{}/searches/{}/estimateStatistics".format(
case['id'], search['id']), body=None)
- Downloading the search results works with an access token scoped to b26e684c-5068-4120-a679-64a5d2c909d9/.default
- Starting the purge works: startpurge = graph.post('security/cases/ediscoveryCases/{}/searches/{}/purgeData'.format(case['id'], search['id']), body=body)
But the end result of that purge is that nothing is deleted. The app registration has all the rights that are needed, as far as I can see (Purview role with 'Search and purge').