azure-ad-graph-api

How can I grant my application full access to the AAD Graph API for my tenant? [duplicate]

孤者浪人 提交于 2019-12-06 07:13:41
This question already has an answer here : Insufficent privileges when accessing azure graph api users list (1 answer) Closed 2 years ago . I have registered an AAD Application in my Tenant/Directory, and I want to call the Graph API in the App Only Context. (Using the Client Credential Flow) When making certain AAD Graph API calls, I get the error: "odata.error":{ "code":"Authorization_RequestDenied", "message":{ "lang":"en","value":"Insufficient privileges to complete the operation." } } I want to give this application full access to the Graph API in the context of my tenant. Or I want to

How to tell when to use EWS vs rest API in Outlook Add-in

对着背影说爱祢 提交于 2019-12-06 04:52:12
Is it possible to tell either in the XML file or through OfficeJs if the add-in can use the REST API or if it needs to use the older EWS API? We have an Outlook add-in that needs to support OWA/O365 and Outlook 2016 with a stand alone exchange server. We are wondering if it is possible through the manifest XML file or through OfficeJs to detect the configuration of users account so we can properly access their content with the correct API. The only alternative I can see is to provide two separate add-ins for this, but I assume MS has a solution to this issue. There isn't a specific API for

O365 Webhook Subscriptions for All Users Calendars

此生再无相见时 提交于 2019-12-06 02:43:39
There is an existing question which already has an answer; however, the answer comes from a Microsoft developer and reads, "We are working to support the scenario you are requesting..." and goes on to provide a method which doesn't seem to answer my question. Original article: Using Microsoft graph to read all users calendars My question is, rather than subscribing to a single user's mailbox or calendar, is it possible to subscribe to all mailboxes or calendars? My application needs to listen to the create/update/delete events of calendar meetings and insert them into a SharePoint list. POST

How to create app registration using Azure SDK

此生再无相见时 提交于 2019-12-05 21:02:51
I need to create an app registration with Azure AD using Azure SDK (or using rest api call, if it's not possible with SDK) normally you do it manually using portal: or calling Azure CLI command az ad app create How can I do it from SDK or REST service There are 2 possible ways to do this. You can pick what works based on your scenario. Microsoft Graph API Beta Endpoint Microsoft Graph API Beta endpoint and working with Application resource (as answered by Jean-Marc Prieur earlier too). POST https://graph.microsoft.com/beta/applications NOTE : This would work but caveat being it's a beta

How to determine if an email address is a Microsoft 'Work or School' account or a Microsoft Account

Deadly 提交于 2019-12-05 19:29:24
I would like to authenticate against both Microsoft accounts and 'Work or School' accounts in a Azure multi-tenant environment. Each authentication type requires different requests. If I try to login as a Microsoft account against the 'work or school' request the login will fail at the Microsoft login and not return to my application. Is there a way to query if a given email address is a 'Work or School' account against the Microsoft graph API? If you use the REST api, it should automatically handle the two types of accounts. However, it is in preview and might have restrictions or issues.

Azure Active Directory - MVC application best practices to store the access token

坚强是说给别人听的谎言 提交于 2019-12-05 12:34:14
I've set up a simple MVC Application using Azure Active Directory(AAD). I need to query the AAD Graph API in order to manage application roles and groups from my application. In the Startup class, I received the AccessToken like that: public void ConfigureAuth(IAppBuilder app) { AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.NameIdentifier; app.SetDefaultSignInAsAuthenticationType(CookieAuthenticationDefaults.AuthenticationType); app.UseCookieAuthentication(new CookieAuthenticationOptions()); app.UseOpenIdConnectAuthentication( new OpenIdConnectAuthenticationOptions { ClientId =

Deleting an Application's AppRole in Azure Active Directory

拜拜、爱过 提交于 2019-12-05 10:37:18
Removing an AppRole from an Application’s manifest produces a 400 Bad Request with the error Property value cannot be deleted unless it is disabled first. When I set the isEnabled property to false and then hit save, I get a successful saven with a 200 OK looking at the browsers developer tools: After reloading the Edit manifest screen the isEnabled property is still true and if you look at the PUT response in the browsers developer tools, it's coming back as true there too. How can I remove an appRole without having to delete and recreate the entire application? Update I've raised the

Role Count using Graph Api against a tenant

流过昼夜 提交于 2019-12-04 18:46:45
Is there a way to find each role that exists against a tenant and number of users which have been assigned against each role using GraphServiceClient or GraphConnection class? I am using C#. Directory Roles - Finding all directory roles and count of their members for tenant I have given sample code for both Microsoft Graph API ( https://graph.microsoft.com ) as well as Azure AD Graph API ( https://graph.windows.net ), but it would be strongly recommended to use newer Microsoft Graph API unless there is something specific that you aren't able to get from it and only then look at Azure AD Graph

Office 365 v2 API Authorization code is malformed or invalid

扶醉桌前 提交于 2019-12-04 18:12:04
I've the following auth code copied from the browser for a user who granted our app to use their Office 365 email. code=OAQABAAIAAADRNYRQ3dhRSrm-4K-adpCJ3J3UJ8GyC2qJDvNhlrUAObjph6sQ3A9waeQ5Tr-DA6WzxCdFbvadCRJw2S4a_lwA7MyelZWAPQZOlaB_X_1165CbmTXJMGioU6Cr0DhVTUzIlUv_-Svjp8DBrLVCxcDp5rJMM5mDNR0iGysuDIozWnOaPqCOl35NxPzyktrYK6D1MBptmXOPbhS-stTZXbHJr9gGE3FHzMU0XANXmTm30q4SPaoWPch-S1uFFL4xwS2oUv-lELBdcfIGh5UJBSraabGihVWUnbwBhh8eURSMRwryi7kubUcq0D27S-vIVZhtKopemQ1njAcExO58S7EgAyqbIzMxvmBXBe0X1ieVrcyHYRpt4ZAq1Z4v5HLTrYhx5fGp6AkqhV09yri3bqXaZvw5R1hKuhAbRDt_isZn

Insufficent privileges when accessing azure graph api users list

白昼怎懂夜的黑 提交于 2019-12-02 15:11:39
问题 I'm trying to fetch users from azure active directory using graph api. I've tried many ways, none of them worked, but let's stick to simplest one - using this instruction and some app to make http requests (I'm using postman) I'm able to obtain autherization token with no problem. After that I want to get users list using https://graph.microsoft.com/v1.0/users, passing token in header. Instead of the users list I get "Insufficient privileges to complete the operation." This error message is