azure-ad-graph-api

Resetting a user's password

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 00:03:24
I am trying to find a solution for resetting user's passwords (all users, not just the authenticated user) in Azure Active directory via a non-interactive login. Right now it seems this is only available via powershell's MSOnline Set-AzureADUserPassword cmdlet using a Service Principal login. I'd like to find a solution using an API Endpoint so I can use C#. The closest solutions I've found was Microsoft Graph API but after setting it up, I realized I can only reset the passwords via an interactive login and consent flow. It's not allowed via non-interactive. My next attempt is to use Azure AD

Revoke a refresh token on Azure AD B2C

谁都会走 提交于 2019-12-01 23:27:48
问题 I don't know if there is a solution to revoke a refresh token when : - a user reset its own password with the reset password policy ? - a user change its own password with a specific form based on Graph API ? I think it must be implemented for security reason but I don't if it's possible for now and if not when will it be available ? Thanks in advance 回答1: I found a similar questions to your question Costs of B2C and Refresh tokens. The essential part of the answer from the other question is:

Microsoft Graph API: 403 Forbidden error when trying to retrieve policies on tenant

主宰稳场 提交于 2019-12-01 18:18:40
I'm trying to retrieve the policies created for my tenant on the Azure AD portal using the Microsoft Graph API. As I understand from the graph API documentation, all the policy CRUD operations require a scope of Directory.AccessAsUser.All . This scope translates to the permission Access directory as the signed-in user as mentioned here - https://developer.microsoft.com/en-us/graph/docs/authorization/permission_scopes I have been trying to configure my application on the both the new Azure portal and the old one with different failure points. On the new portal: I have created a Web Application

Create application in Azure Active Directory using graph API fails

半城伤御伤魂 提交于 2019-12-01 18:04:29
问题 I'm trying to use the Azure Active Directory Graph API (with the Azure GraphClient nuget package) to create a new application in Azure AD. I've authenticated using an existing AAD application, so I have write access to the directory. However, when creating the new application object the Azure Graph API returns this error: {"odata.error": { "code":"Request_BadRequest", "message": { "lang":"en", "value":"Property value cannot have duplicate id or claim values." }, "values": [{ "item":

Azure AD add keys via Azure CLI

♀尐吖头ヾ 提交于 2019-12-01 16:05:52
I'm trying to add a key in my Azure AD application using Azure CLI. But looking throught the Azure CLI API it seems that there is no such command. For exmaple: I'm trying to automate the task from the link below via Azure CLI: http://blog.davidebbo.com/2014/12/azure-service-principal.html I can create AD application, service principal, but I can't find a way to add key for newly create AD application. I'll appreciate any ideas and directions :) Thanks in advance ! For a new AD application, you can specify a key with -p while creating. For example, azure ad app create -n <your application name>

Azure AD add keys via Azure CLI

这一生的挚爱 提交于 2019-12-01 15:05:51
问题 I'm trying to add a key in my Azure AD application using Azure CLI. But looking throught the Azure CLI API it seems that there is no such command. For exmaple: I'm trying to automate the task from the link below via Azure CLI: http://blog.davidebbo.com/2014/12/azure-service-principal.html I can create AD application, service principal, but I can't find a way to add key for newly create AD application. I'll appreciate any ideas and directions :) Thanks in advance ! 回答1: For a new AD

“Unexpected Error” connecting to Azure AD with Connect-MsolService -AccessToken

妖精的绣舞 提交于 2019-12-01 11:59:19
I'm using the new preview version of the Azure AD PS module. I'm trying to connect via the new AccessToken parameter: Connect-MsolService - AccessToken ey... But I'm getting an "Unexpected Error" back. Connect-MsolService : An unexpected error occurred. At line:1 char:1 + Connect-MsolService -AccessToken eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [Connect-MsolService], MicrosoftOnlineException + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation

“Unexpected Error” connecting to Azure AD with Connect-MsolService -AccessToken

余生长醉 提交于 2019-12-01 09:59:13
问题 I'm using the new preview version of the Azure AD PS module. I'm trying to connect via the new AccessToken parameter: Connect-MsolService - AccessToken ey... But I'm getting an "Unexpected Error" back. Connect-MsolService : An unexpected error occurred. At line:1 char:1 + Connect-MsolService -AccessToken eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ik1 ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [Connect

Azure Graph API, Angular, Get users Groups

对着背影说爱祢 提交于 2019-12-01 07:31:18
I want to query Azure AD Graph API to retrieve the groups claim for the logged in user from a registered Azure B2C app. The app I'm calling from is an Angular 5 SPA. After experimenting with Azure Active Directory and adal-angular4, I was successful retrieving a user's custom roles claim . To do this, I registered an Azure AD app, set required permission scopes, added custom roles to the application's manifest, added the user to the application, and set the custom role for the user. Then, I used my new registered app's application id and tenant for the adal-angular4 config. When I query the

How to retrieve contents of an itemAttachment via the Microsoft Graph API

本秂侑毒 提交于 2019-12-01 05:56:37
I'm currently developing a solution which is retrieving e-mails via the Microsoft Graph API. In november 2015 Microsoft stated it is ready for production and I've read in another forum post that if you start now on developing using a Microsoft API, you should use the Graph API, since it is the future. Everything is going well except for one thing and that is the following. I must retrieve e-mails. Inside these e-mails there are of course attachments. These attachments come in some variaties. fileAttachment (images, documents etc.), referenceAttachments and itemAttachments (outlook-item). The