Quantcast
Channel: Azure Active Directory forum
Viewing all articles
Browse latest Browse all 16000

Deleting user with Azure Graph API returns "Insufficient privileges"

$
0
0

I have an active directory setup called iVector

I got the sample code from ConsoleApp-GraphAPI

Followed instructions and got the application running right up until it tries to do a delete of the added users. Then I get an insufficient Permissions error.

I have read articles on the web that say I need to give delete permissions to the Service Principal

Unfortunately when I try connecting in  Microsoft Azure Active Directory Module for Windows PowerShellI got errors.

$msolcred = get-credential

connect-msolservice -credential $msolcred

I get this error. Can someone please explain why and even if I am going down the wrong path to get the ability to delete users.

connect-msolservice : The type initializer for 'Microsoft.Online.Administration.Automation.ConnectMsolService' threw an exception.
At line:1 char:1
+ connect-msolservice -credential $msolcred
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [Connect-MsolService], TypeInitializationException
    + FullyQualifiedErrorId : System.TypeInitializationException,Microsoft.Online.Administration.Automation.ConnectMsolService


Viewing all articles
Browse latest Browse all 16000

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>