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