Skip to main content
Glama

Azure MCP Server

Official
MIT License
1,161
  • Linux
  • Apple
AuthorizationCommandTests.cs1.71 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System.Text.Json; using AzureMcp.Tests; using AzureMcp.Tests.Client; using AzureMcp.Tests.Client.Helpers; using Xunit; namespace AzureMcp.Authorization.LiveTests; public class AuthorizationCommandTests(LiveTestFixture liveTestFixture, ITestOutputHelper output) : CommandTestsBase(liveTestFixture, output), IClassFixture<LiveTestFixture> { [Fact] public async Task Should_list_role_assignments() { var scope = $"/subscriptions/{Settings.SubscriptionId}/resourceGroups/{Settings.ResourceGroupName}"; var result = await CallToolAsync( "azmcp_role_assignment_list", new() { { "subscription", Settings.SubscriptionId }, { "scope", scope } }); var roleAssignmentsArray = result.AssertProperty("Assignments"); Assert.Equal(JsonValueKind.Array, roleAssignmentsArray.ValueKind); var enumerator = roleAssignmentsArray.EnumerateArray(); Assert.NotEmpty(enumerator); var testRoleAssignmentFound = false; var expectedDescription = "Role assignment for azmcp test"; // Defined in ./infra/services/authorization.bicep while (enumerator.MoveNext() && !testRoleAssignmentFound) { var roleAssignment = enumerator.Current; var description = roleAssignment.AssertProperty("Description").GetString(); testRoleAssignmentFound = expectedDescription.Equals(description, StringComparison.Ordinal); } Assert.True(testRoleAssignmentFound, "Test role assignment not found in the list of role assignments."); } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Azure/azure-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server