小编Sha*_*llu的帖子

获取特定 Azure 目录的用户 Graph Explorer

我在 Azure 的一次登录中有两个目录。

当我点击 Graph Explorer API 来获取用户时,它会自动转到默认 AD。

https://graph.microsoft.com/v1.0/users
Run Code Online (Sandbox Code Playgroud)

我想切换目录然后获取用户。

我刚刚找到了这个文档,其中需要注册应用程序并且您在租户中提供目录名称。

请帮忙。

azure-active-directory microsoft-graph-api

5
推荐指数
1
解决办法
1684
查看次数

超出了 Azure 服务总线 SDK 的 SendBatch() 方法上的链接异常当前允许的限制(262144 字节)

我们使用 Azure 服务总线 SDK 3.1.7 的 SendBatch() 方法将数据发送到 Azure 事件中心。以下是代码片段:

foreach (var packet in transformedPackets)
        {
            EventData eventData = new EventData(Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(packet, settings)));;
            try
            {
                eventData.Properties.Add(AppConstants.TenantDeploymentUniqueIdKey, tenantDeploymentUniqueId);
                eventData.Properties.Add(AppConstants.DataTypeKey, DataTypeKey);
                byteCount += eventData.SerializedSizeInBytes;                   
                if (byteCount > MaxBatchSize)
                {
                    sender.SendBatch(transformedMessages);
                    transformedMessages.Clear();
                    byteCount = eventData.SerializedSizeInBytes;
                }
                transformedMessages.Add(eventData);
            }
            catch (System.Exception)
            {
                eventData.Dispose();
                throw;
            }

        }
Run Code Online (Sandbox Code Playgroud)

在将事件数据添加到批处理之前检查 SerializedSizeInBytes 属性后的事件(最大允许限制:256 KB),我们收到以下异常:

接收到的消息(delivery-id:0,大小:262279 字节)超过了当前链路上允许的限制(262144 字节)。在 Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception) 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 在 Microsoft.ServiceBus.Common.AsyncResult 1.End(IAsyncResult asyncResult) at Microsoft.ServiceBus.Messaging.MessageSender.RetrySenderEventDataAsyncResult.End(IAsyncResult r) at Microsoft.ServiceBus.Messaging.MessageSender.EndSendEventData(IAsyncResult result) at Microsoft.ServiceBus.Messaging.EventHubSender.SendBatch(IEnumerable1 eventDataList)

azureservicebus azure-eventhub

3
推荐指数
1
解决办法
4580
查看次数