用户如何通过graph-api预览URL在PowerPoint文件中查看注释?

问题描述 投票:0回答:1

我们正在使用Graph API在面向公众的Web应用程序中显示我们的本地共享点文件。 Web应用程序的用户抱怨PowerPoint文件中的注释很重要,他们无法通过我们的应用程序看到这些注释(我们使用图表的预览URL向他们显示文件。)

让他们下载文件副本以在PowerPoint中自己打开(我们的利益相关者不希望用户能够下载我们文件的副本)的简短方式,是否可以通过查看器实现?

[如果我们使用来自graph-api的webUrl属性,则会在Office 365 PowerPoint Web应用程序中的共享点上打开该文件,该文件允许查看幻灯片注释,但这不适用于没有帐户的用户。我们的本地共享点,因此此时将提示您登录到我们的共享点站点(我们不希望他们在此处拥有帐户。)

当前代码(简体)为:

<a href='#' onclick="LoadFilePreview('{sharepoint-item-id-goes-here}')>Click here to view the slideshow</a>

和js:

    function LoadFilePreview(itemId) {
        var auth = $("#authToken").val();
        var graphUrl = "https://graph.microsoft.com/v1.0/sites/" + siteId + "/drive/items/" + itemId + "/preview";
        $.ajax({
            type: "POST",
            url: graphUrl,
            dataType: 'json',
            headers: { "Authorization": "Bearer " + auth },
            accept: "application/json"
        }).done(function (data) {
            window.open(data.getUrl);
        }).fail(function (e) {
            ajaxFailed(e.status, LoadFilePreview, itemId);
        });
    }
microsoft-graph powerpoint azure-ad-graph-api sharepoint-api microsoft-graph-files
1个回答
1
投票

[恐怕没有登录用户我们就无法拨打POST /drives/{driveId}/items/{itemId}/preview

基于driveItem: preview Permissions,不支持应用程序权限(无用户)。enter image description here

您可以将您的想法发布在Microsoft Graph User Voice上,以引起产品组的注意。

© www.soinside.com 2019 - 2024. All rights reserved.