public function assignContributorRoleToApp($subscriptionId, $roleAssignmentId, $appObjectId, $contributorRoleId)
{
$result = null;
$path = '/subscriptions/' . $subscriptionId . '/providers/Microsoft.Authorization/roleAssignments/' . $roleAssignmentId;
$headers = ['Authorization' => 'Bearer ' . $this->getAccessToken()->token];
$requestData = ['properties' => ['roleDefinitionId' => "/subscriptions/" . $subscriptionId . "/providers/Microsoft.Authorization/roleDefinitions/" . $contributorRoleId, 'principalId' => $appObjectId, 'scope' => '/subscriptions/' . $subscriptionId]];
$request = $this->getClient()->prepareRequest($path, 'PUT', self::RESOURCE_API_VERSION, Azure::URL_MANAGEMENT_WINDOWS, [], $requestData, $headers);
$response = $this->getClient()->call($request);
if (!$response->hasError()) {
$result = RoleAssignmentData::initArray($response->getResult());
}
return $result;
}