我在用MicrosoftGraphAPI。通过图形资源管理器公开的相同的。
问题是,无论我传递什么serviceRoot URI,我都会得到一个异常。ActiveDirectoryClient与MicrosoftGraph兼容吗?我之所以这样问,是因为我看到使用ActiveDirectoryClient的示例是使用Azure AD GraphAPI。这个显示了旧的Azure AD GraphAPI和新的<e
此外,我还添加了Microsoft.Graph权限Directory.Read.All、Group.Read.All和GroupMember.Read.All,并为权限授予了管理权限。以下是权限:下面是我用来检索组的用户的代码:
var scopes = new string[] { "https://graph.microsoft.com/.defaultGraph (gets a fresh token if needed).
当使用访问令牌初始化客户端时,Microsoft图形将引发以下异常访问令牌是在初始化客户端之前生成的&同样的令牌也适用于post。let graphClient = graph.Client.init({
// Use the provided access token to authenticate