graph-explorer | Open source graph data visualiser for Apache TinkerPop | Graph Database library
kandi X-RAY | graph-explorer Summary
kandi X-RAY | graph-explorer Summary
Open source Graph Data Visualiser for Apache TinkerPop supported Graph Databases.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of graph-explorer
graph-explorer Key Features
graph-explorer Examples and Code Snippets
Community Discussions
Trending Discussions on graph-explorer
QUESTION
The requirement is to send a chat message to a channel in MS Teams using Graph APIs. The idea is to automate a workflow that when triggered sends a message to a channel mentioning a chatbot (e.g. @XXXbot hello).
Incoming webhook link feature provided out-of-the box by MS Teams can not be used as it lacks the @mention functionality.
So, the question is how can I create an automation framework that does the following as and when required:
- Authenticate/authorize every time I hit the API
- Sends chat messages to a channel in MS Teams
Given, I have already created an AAD user that I have used with MS Graph Explorer and was able to send the message. I want to utilize the same credentials in my automation too.
I went through the MS docs but all of them are talking about registering an App in azure portal to achieve this e.g. here: Auth concepts, so wondering if that's the only way or do we have any other way to achieve this purely through user credentials. I am fine with even if there are some curl commands to be made for this.
...ANSWER
Answered 2021-May-11 at 00:55To call Microsoft Graph, you have to register an App in azure portal.
Per my understanding, you want to use a user token (corresponding to application token) but you don't want interactively sign-in.
In this case, the only way is using Resource Owner Password Credentials flow, which allows an application to sign in the user by directly handling their password.
We need to put our password into the request. Therefore, it is inevitable to bear certain security risks.
Please note that:
Microsoft recommends you do not use the ROPC flow. In most scenarios, more secure alternatives are available and recommended. This flow requires a very high degree of trust in the application, and carries risks which are not present in other flows. You should only use this flow when other more secure flows can't be used.
But based on your requirement, the only way is using this flow. Take it as your own risk.
QUESTION
Hi all and thanks in advance for all feedback. It is much appreciated!
I use NuGet packages: Microsoft.Graph 3.27.0 Micfosoft.Graph.Auth 1.0.0
and OnBehalfOfProvider and basically just want to list users or filter to a specific one from Azure Active Directory, but I can't seem to figure out how to do the same as I am allowed to with Graph Explorer (https://developer.microsoft.com/en-us/graph/graph-explorer). With the online explorer I have no issues:
Everything fine with Graph Explorer and listing users
But in my C# .NET application when I try to do the same with scopes parameter: string[] graphScopes = { "User.Read","profile", "Sites.ReadWrite.All"}; or string[] graphScopes = { "https://graph.microsoft.com/user.read+offline_access"};
I get Status 500 Internal Server Error and these details:
"error": { "code": "generalException", "message": "Unexpected exception returned from MSAL." ... "innerException": { "classification": 4, "statusCode": 400, "claims": null, "responseBody": "{"error":"invalid_grant","error_description":"AADSTS65001: The user or administrator has not consented to use the application with ID 'c0fb187f-daa8-4566-a7fb-2decd05ef980' named 'platform-test-ad'. Send an interactive authorization request for this user and resource.
And with scopes parameter: string[] graphScopes = new string[] { "https://graph.microsoft.com/.default" };
I get 403:
"error": { "code": "Authorization_RequestDenied", "message": "Insufficient privileges to complete the operation.", ... "statusCode": 403, "rawResponseBody": "{\r\n "error": {\r\n "code": "Authorization_RequestDenied",\r\n "message": "Insufficient privileges to complete the operation."
Inside Azure, Enterprice applications | User settings looks like this: Enterprice applications User settings
and my C# code looks like this:
...ANSWER
Answered 2021-Mar-31 at 13:07Make sure your account is not a personal(invited) account when calling Microsoft Graph API to list users.
And you need to add one of the delegated permission in API Permission from Azure portal, such as User.Read.All
. The scope User.Read
in your issue has not enough permissions.
QUESTION
I followed this tutorial: https://mihai-albert.com/2020/05/13/using-microsoft-graph-to-modify-excel-files-stored-in-sharepoint-online-with-c/
When I use graph-explorer and do a GET https://graph.microsoft.com/v1.0/drives/{drive-id}/root/search(q='{search-text}')?select=name,id,webUrl then I get the item id with no problem. But then when I want to get the workbook in my application
...ANSWER
Answered 2021-Apr-14 at 15:00When using application permissions to call GET /drives/{drive_id}/items/{item_id}, your app needs one of the application permissions listed here most likely Files.Read.All
I have observed that when you have an acess_token that does not have one of the required permissions, you get itemNotFound which is misleading.
In your case just add Files.Read.All application permissions(requires admin consent) to your app on Azure AD.
QUESTION
I'm trying to understand how to configure a dotnet core web app to let me sign in using a personal Microsoft account and browse my OneDrive files.
Firstly, I've used the Microsoft Graph Explorer, signed in using the account I want to use, and verified that I can browse my drive. There it tells me the query URL is https://graph.microsoft.com/v1.0/me/drive/root/children and that it's using v1.0 of the Graph API. There's even a c# code snippet tab that shows me this:
...ANSWER
Answered 2021-Mar-31 at 06:10Okay, let me explain your doubts.
First of all, you misunderstood what I said in the comments. I’m just asking if you set the support account type to: Personal Microsoft accounts only
when creating the application. I just ask you for verification, not suggest you do it. Because this may be the cause of the error :'xxxxxxxxxxx'(AppName) is configured for use by Microsoft Account users only. Please use the /consumers endpoint to serve this request
.
According to the documentation. The /tenant id
or /contoso.onmicrosoft.com
endpoint only allows users with work/school accounts of a specific Azure AD tenant to log in to the application. It does not support personal accounts.
Only the /common
and /consumers
endpoints will allow personal Microsoft accounts to log in to the application. Because you can get the correct response only by using your personal account, so you only need to log in using the /common
endpoint.
QUESTION
I am trying to use the request:
...ANSWER
Answered 2021-Mar-25 at 11:19Your error is not a lack of permissions but the use of the wrong scope
.
The error is actually very simple, you need to grant Azure Service Management
api permissions instead of MS graph
permissions, and then you need to set the scope
to: https://management.azure.com/user_impersonation
.
Next, use the auth code flow to obtain an access token.
- Request an authorization code in the browser.
QUESTION
My outlook account at work is a member of a group called GraphTest which has email address GraphTest@companyname.net.
I'm trying to use the graph explorer to access mail in that group's inbox.
When I run the query https://graph.microsoft.com/v1.0/users/graphtest@companyname.net/messages I get the error message
Group Shard is used in non-Groups URI.
When I replace graphtest@companyname.net with my own email it works. Also I've consented to the permissions Mail.Read and Mail.Read.Shared.
What does this error message mean, and how can I fix it?
...ANSWER
Answered 2021-Mar-21 at 13:46https://graph.microsoft.com/v1.0/users/graphtest@companyname.net/messages
Firstly the above API call which you used is invalid because you are giving a group email id to get it from user like /users/graphtest@companyname.net/messages
which is invalid.
Even there is no mention in documentation that we can use something like /groups/graphtest@companyname.net/messages
.
You can get some details from List Conversations using something like this.
https://graph.microsoft.com/v1.0/groups/{group_id_only}/conversations
QUESTION
I'm trying to search file on SharePoint using Graph API. Getting the correct result on Microsoft graph-explorer
but when I try with C# Getting error Status Code: 500
Reason Phrase:Internal Server Error
Response Details as below:
...ANSWER
Answered 2021-Mar-21 at 13:13Try using the below code. Looks like your code is getting serialized twice. So I just removed the serialization step and it worked.
QUESTION
I am trying to filter users having certain schemaExtension and assignedPlan. But i receive an error response.
here is my request, and schemaExtension i used.
Response can be seen below.
...ANSWER
Answered 2021-Mar-15 at 15:59You can filter assignedPlans using the below query.
https://graph.microsoft.com/beta/users?$count=true&$filter=assignedPlans/any(a:a/servicePlanId eq bf6f5520-59e3-4f82-974b-7dbbc4fd27c7 and a/capabilityStatus eq 'Enabled')
Add header ConsistencyLevel=eventual
.
But you cannot filter schema extensions as specified in the Known issues document. After getting results from above query, use that data and filter it on your end by writing the code.
QUESTION
I'm trying to execute the userinfo endpoint at https://graph.microsoft.com/oidc/userinfo using an access token received through Open ID Connect.
The response received is:
400 Bad Request
...ANSWER
Answered 2021-Mar-03 at 02:48The access token is valid and does contain a sub claim.
I suppose you didn't get the token correctly, please follow the steps below.
1.Register an application with Azure AD
2.In the API permissions
of the AD App, add the following permission in Microsoft Graph
3.In the Authentication
, choose the options below.
4.Hit the URL below in the browser, replace the ,
of yours, login your user account, then you will get an
access_token
and an id_token
.
QUESTION
I want to have an extra claim say "mygroupsrmm" in my jwt token which I want to view post decoding the token. I am trying to add custom claims to my jwt token which I will receive post authentication using Oauth2 flow. I've already modified application manifest file for registered AAD app with
"acceptMappedClaims": true
& followed below steps:
//Step1 - Created custom policy
New-AzureADPolicy -Definition @('{"ClaimsMappingPolicy":{"Version":1,"IncludeBasicClaimSet":"true","ClaimsSchema":[{"Source":"user","ID":"extensionattribute2","SamlClaimType":"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/rmmgname","JwtClaimType":"mygroupsrmm"}]} }') -DisplayName "MyGroupsRMMExtraClaims" -Type "ClaimsMappingPolicy"
//Step2 - assigned policy to my AAD registered app
$appID = <> $sp = Get-AzureADServicePrincipal -Filter "servicePrincipalNames/any(n: n eq '$appID')" $policyId = <> Add-AzureADServicePrincipalPolicy -Id $sp.ObjectId -RefObjectId $policyId
Above both steps are successful, now I went ahead with authentication calls
//Step3 : GET /authorize API call
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?response_type=code&client_id=my-application-id-registered-in-AAD& redirect_uri=http://localhost:3000/callback&scope=openid%20profile%20email%20offline_access%20User.Read%20Files.Read
From this step, authorization code is received, which is passed on to the /token API call
//Step4: POST /token call
...ANSWER
Answered 2021-Feb-26 at 13:03You must be an administrator to modify this attribute. I have tested it just now.
Update : Post assigning Directory writer role to the AAD user, above issue is fixed. See here for success calls
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install graph-explorer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page