I'm trying to create an app role where I will have two allowedMemberTypes: Application and Users. But it throws errors: Invalid value specified for property 'allowedMemberTypes' of resource 'AppRole'.
Here are the cmdlets:
$contributorRole = new-object Microsoft.Open.AzureAD.Model.AppRole -Property @{
IsEnabled = $true;
Description = "Read/write access";
DisplayName = "Contributor";
AllowedMemberTypes = @("User", "Application");
Id = [guid]::NewGuid().ToString();
Value = "bcc.contributor";
};
$myApp = New-AzureADApplication -Oauth2AllowImplicitFlow $true -Oauth2RequirePostResponse $true -DisplayName $displayName -AppRoles $contributorRole
Here is the result of the cmdlets
If you remove the Application from the $contributorRole it will work.