我有一个要使用Excel / PowerPivot消耗的OData提要。该提要使用OAuth 2(Windows Azure Active Directory是身份验证服务器)受到保护。PowerPivot表导入向导上的高级选项卡具有一些UI,该UI允许您指定OAuth并允许您放入授权令牌(我假设这是访问令牌,但我可能错了):

但是,当我测试连接时,出现错误消息,告诉我如果不使用Windows身份验证,则必须输入用户名和密码。这违反了OAuth 2的目标,但是作为实验,我确实输入了用户名和密码。这次,当我测试连接时,从服务器收到了未经授权(401)错误。
使用提琴手查看由测试连接发出的请求,我可以看到该请求中没有包含Authorization标头,因此显然它永远无法工作。我曾经希望/期望将授权令牌作为承载令牌包含在Authorization标头中。这就是我的服务要求。
我还尝试放入刷新令牌和Arefresh令牌URL,但结果相同。有一个使用“客户端机密”的选项,但是我没有尝试过,因为这并不安全(我认为OAuth 2仅支持机密客户端,而Excel则不支持)。
因此,我的问题是:是否有人能够使用此OAuth选项将数据导入到Excel或PowerPivot中?如果是这样,您该怎么做?
更新:我意识到我的服务没有响应此处指定的正确的WWW-Authenticate标头值:
http://self-issued.info/docs/draft-ietf-oauth-v2-bearer.html#authn-header
因此,我更改了服务代码。现在,我看到了正确的WWW-Authenticate响应头(方案=承载者,领域=我的领域),但这没有什么区别。我在Excel发出的请求中看不到任何变化。
更新:我也尝试使用OAuth 1版本的WW-Authenticate标头(scheme = OAuth),但仍然没有。
我有多个Azure存储帐户,并且尝试使用HDInsight查询存储分析日志。我想对所有存储帐户使用单个查询,因此我创建了一个外部Hive表并为每个存储帐户添加了一个分区:
ADD JAR wasb:///HdiSamples/StorageAnalytics/hive-serde-microsoft-wa-0.13.0.jar;
CREATE EXTERNAL TABLE IF NOT EXISTS AggregateStorageLogs3 (
VersionNumber string,
RequestStartTime string,
OperationType string,
RequestStatus string,
HttpStatusCode string,
EndToEndLatencyInMs bigint,
ServerLatencyInMs bigint,
AuthenticationType string,
RequesterAccountName string,
OwnerAccountName string,
ServiceType string,
RequestUrl string,
RequestedObjectKey string,
RequestIdHeader string,
OperationCount bigint,
RequesterIpAddress string,
RequestVersionHeader string,
RequestHeaderSize bigint,
RequestPacketSize bigint,
ResponseHeaderSize bigint,
ResponsePacketSize bigint,
RequestContentLength bigint,
RequestMD5 string,
ServerMD5 string,
ETagIdentifier string,
LastModifiedTime string,
ConditionsUsed string,
UserAgentHeader string,
ReferrerHeader string,
ClientRequestId string)
COMMENT 'aggregated storage analytics log data'
PARTITIONED BY …Run Code Online (Sandbox Code Playgroud) 受试者说这一切......
为什么Azure DocumentDB有两个密钥(主要和次要)?