office365

Word Add-in - How to read custom document property

六眼飞鱼酱① 提交于 2019-12-10 18:15:20
问题 I am developing a Word plugin using the Office JS API. Currently I can add custom properties to the Word document by doing: context.document.properties.load(); context.document.properties.customProperties.add("file-name-prop", "my file name"); If I then download the file I can see the property in the "custom.xml" file inside the zipped docx. But I am not able to read the property back. I am trying to do it like this: context.document.properties.load(); var filenameProp = context.document

How to use Microsoft.Graph with client authorization and not get a 401

冷暖自知 提交于 2019-12-10 18:15:00
问题 We have created Azure Active Directory created a new Application registered the new Application in Azure AD given ALL the permissions to the API granted admin permissions Now we login with this app credentials We get authorization: GET /1111111-aaaa-4fd3-bf32-9bfc460f67b1/oauth2/v2.0/authorize HTTP/1.1 Host: login.microsoftonline.com cache-control: no-cache Postman-Token: 111111-aaaa-4696-9828-9110670706c5 We get the token: POST /11111111-aaaa-4fd3-bf32-9bfc460f67b1/oauth2/v2.0/token HTTP/1.1

Graph Api - 401 Unauthorised

泄露秘密 提交于 2019-12-10 17:52:38
问题 just started in the graph/office API and wow is it a minefield! Just wondering if anyone can give me any advice? I am getting a 401 when I attempt to contact https://graph.microsoft.com/beta/me/files. My JWT is as follows: { "aud": "https://graph.windows.net/", "iss": "https://sts.windows.net/916970f4-e570-4036-a353-8ae647af1d3e/", "iat": 1444794383, "nbf": 1444794383, "exp": 1444798283, "ver": "1.0", "tid": "916970f4-e570-4036-a353-8ae647af1d3e", "oid": "c454b826-612f-4525-8995-87f1a24dc3df"

Microsoft Graph API Update another user's photo?

二次信任 提交于 2019-12-10 16:26:59
问题 Using the Microsoft Graph API I was able to get a list of all users in our Azure Active Directory tenant and determine if they have a profile picture. I wanted to then take the list of users without a photo and upload one for them, but the API returns a 403 error even though the account I'm using has full access to all of the user accounts and the application is setup with full permissions to the Graph API. using (HttpClient client = new HttpClient()) { client.BaseAddress = new Uri("https:/

Invoking PowerShell cmdlets more quickly in C#

六眼飞鱼酱① 提交于 2019-12-10 15:38:47
问题 I am able to fetch user details from O365 using Powershell cmdlets in C#. The problem is the fetching time. That is too slow. It takes 2 seconds to each user so it will lead to a time problem if I have the bulk of users. Here I am just want to print all the user's info like name, group details, licenses. How can I do it more quickly? Tried one: Runspace runspace = RunspaceFactory.CreateRunspace(); runspace.Open(); Pipeline UserDetailsPipe = runspace.CreatePipeline(); UserDetailsPipe.Commands

Approve email message via exchange EWS API

冷暖自知 提交于 2019-12-10 14:03:50
问题 I have a situation where I would need to re-route messages to a different mailbox who would be the moderator. Programmatically - is there a way to approve the message I get in the moderator's mailbox? I dont see explicit support in EWS for it. Does any other API type that microsoft has support this? 回答1: This is not an official approved way but the following workaround worked for me to approve and reject messages in the moderator's mailbox! Below is a Powershell code that does the job! Things

Getting JavaScript-errors when authenticating using ADAL

不问归期 提交于 2019-12-10 12:20:03
问题 I am using the Microsoft Graph API and am successfully querying a user's meetings and emails. A user (testing the application) reported a JavaScript-error during the authentication process with Office 365 (using ADAL), see Screenshot below. A few months ago I noticed these pop-ups too, but they were gone after I've updated the ADAL Nuget -Package. I just checked and there is no update available (current version: 4.0.209160138-alpha). I myself cannot reproduce the issue . It might be that

Cannot access OpenId UserInfo endpoint on Azure (AADSTS90010: JWT tokens cannot be used with the UserInfo endpoint)

自作多情 提交于 2019-12-10 11:59:06
问题 I'm trying to access the OpenId UserInfo endpoint for a user on an Office365 Azure tenant, with the following GET: GET https://login.windows.net/common/openid/userinfo HTTP/1.1 Authorization: Bearer eyJ0eXAiOiJ(...remainder deleted for brevity...) Host: login.windows.net The response fails with "400 Bad Request", and a more specific error "AADSTS50063: Credential parsing failed. AADSTS90010: JWT tokens cannot be used with the UserInfo endpoint" HTTP/1.1 400 Bad Request Cache-Control: no-cache

Excel JS Add-In works in Excel but not Excel Online

微笑、不失礼 提交于 2019-12-10 11:46:50
问题 I've built an Excel JS Task Pane add-in using the WoodGrove Expense Trends sample and have validated that it runs correctly in Excel 2016 on my machine. However, when I go to Excel Online and try to add the add-in (via uploading the manifest from my machine), I get "Your add-in manifest is not valid." I'm not sure what it is about this manifest that's valid on my machine but not in Excel Online. Anyone encountered this before or have any diagnosis ideas? It's somewhat akin to banging my head

Use office 365 login/credentials as Single Sign On

走远了吗. 提交于 2019-12-10 11:37:06
问题 Can I use office 365 login/credentials as Single Sign On? Actually I need to sign in my web application using office 365 login details. Further I want to use following url credentials for Single Sign On in my web application. https://portal.office.com 回答1: Indeed. Office365 identities are backed by Azure Active Directory, and you can build WebApps, WebAPIs and mobile apps secured using Azure Active Directory, so that customers of Offic365 can SSO to your applications. The various auth