The Microsoft Graph Postman Collections has moved to Postman workspaces. Please follow these setup steps.
microsoftgraph / microsoftgraph-postman-collections Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The Microsoft Graph Postman Collections has moved to Postman workspaces. Please follow these setup steps.
A lot more functionality is coming. When can we try it out?
See https://docs.microsoft.com/en-us/graph/overview?view=graph-rest-beta
Addding Get/Post-Requests for sharepoint lists/document libraries would be great.
I would love to see this collection in the Postman network - https://explore.postman.com/network/search?q=graph
I am using POSTMAN to call Microsoft Graph APIs. I am trying to subscribe to presence for multiple users. It is mentioned in document in order to subscribe to changes to multiple user presences use this url /communications/presences?$filter=id in ({id},{id}...)
Request Url ;https://graph.microsoft.com/beta/subscriptions
Request Type: POST
request body(raw):
{
"changeType": "updated",
"notificationUrl": "https://d3a8ebc3581d.ngrok.io/presence-notify/",
"resource": "/communications/presences?$filter=id in (abcd-efgh-4856-a935-c9a2f685xyz,abcd-efgh-47f8-9d79-eacb0fd6xyz)",
"expirationDateTime": "2020-09-22T07:37:13Z",
"clientState": "secretClientState"
}
I am calling this API on behalf of user i.e i am using UserAccessToken. This is Response:
{
"error": {
"code": "BadRequest",
"message": "Invalid filter clause",
"innerError": {
"date": "2020-09-21T16:24:50",
"request-id": "2cf476f0-2270-417f-a987-5c5bbc92a351",
"client-request-id": "2cf476f0-2270-417f-a987-5c5bbc92a351"
}
}
}
P.S: I have changed first few and last few characters of both the user ids. So it's not an issue.
As seen in the community call. The Admin Consent flow steps are not fully documented yet for on behalf of the user calls. I will update the readme instructions and collections soon. This will mean that Teams samples calls won't work following setup steps as is.
Tried to follow the instructions on the YouTube video (https://www.youtube.com/watch?v=4tg-OBdv_8o) by typing adding in the credentials of Microsoft Graph environment.
However, when trying the post method to get an user access token, I get back a 404 error instead of the token body which is automatically copied to the environment variables.
[Enter feedback here]
There is a bug on the json payload to invite user,
Incorrect
"invitedUserEmailAddress": "<Email Address of Invited User>,
Correct
"invitedUserEmailAddress": "<Email Address of Invited User>",
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Hi all,
First of all, thanks for your contributions and sorry I don´t have a lot of knowledge about Graph.
I need some help. I´m working with Graph to try to retrieve all messages for all users for my environment, to see the number of attachments and sizes (Yes, I know this is crazy). I build a JSON for retrieve this data but I found if the users that I can retrieve is greater than 6, Graph not working and send me the following error: "Number of requests inside batch exceeds the limit.".
Method used: POST https://graph.microsoft.com/v1.0/$batch
Example JSON created: {"requests": [{"id": "1","method": "GET","url": "/users/[email protected]/messages?$select=id,receivedDateTime,sentDateTime,hasAttachments,subject,sender,from&$expand=attachments($select=contentType,id,name,size)"}]}
In my JSON, I have all the users including.
Do you have any idea to solve this issue? I thinking if I make a paging response maybe can be solved, but I don´t know how I doing it that.
Many thanks.
Hi guys,
Thanks in advance for your help.
I am developing an application and I am using Azure AD B2C for my customer identity management.
I need to understand how I can use Microsoft Graph API as an Application permissions (without username and password) to get access to B2C user object attributes. I need this for my back-end development.
On postman it works with normal Azure Ad User objects (including B2C user objects) but I cannot see the B2C users attributes. How can I see B2C users attributes and manipulate them?
I really appreciate your help.
Sincerely yours,
Saman
I went through tons of documentation and tutorials, but couldn't make the user token work. App-Only Access Tokens work as expected, but with User Access Tokens I get the following errors:
{
"error": "invalid_grant",
"error_description": "AADSTS50034: The user account Microsoft.AzureAD.Telemetry.Diagnostics.PII does not exist in the xxxxxxxxxxx directory. To sign into this application, the account must be added to the directory.\r\nTrace ID: xxxxxx\r\nCorrelation ID: xxxxxxx\r\nTimestamp: 2019-04-09 13:59:11Z",
"error_codes": [
50034
],
"timestamp": "2019-04-09 13:59:11Z",
"trace_id": "xxxxxxx",
"correlation_id": "xxxxxxx"
}
{
"error": "invalid_grant",
"error_description": "AADSTS50126: Invalid username or password.\r\nTrace ID: xxxxxxxxxxxxxxxxxxxx\r\nCorrelation ID: xxxxxxxxxxxxxxxx\r\nTimestamp: 2019-04-09 13:54:38Z",
"error_codes": [
50126
],
"timestamp": "2019-04-09 13:54:38Z",
"trace_id": "xxxxxxx",
"correlation_id": "xxxxxxx"
}
My app has the following permissions:
Mail.Read, Mail.ReadBasic, Mail.Send, User.Read
None of the above requires Admin Consent, so I think the API permissions are fine.
What I want to do is to automate some actions based on emails my account receives.
When I edited the environment, the variables dialog had columns for Initial and Current values. The http calls did not work until the Current values where set.
Is Initial/Current the default view for new users? Should the instructions specify the location to enter the variables? Should the script look at the Initial values (if possible)?
I have tried this both ways via Python using REST APIs and via Postman
Here is the error I am getting in PostMan
{
"error": {
"code": "UnknownError",
"message": "",
"innerError": {
"date": "2020-12-24T16:09:12",
"request-id": "cca6ac1c-7978-4449-852b-764d95de12d8",
"client-request-id": "cca6ac1c-7978-4449-852b-764d95de12d8"
}
}
}
Also a relevant header here
{"ServerInfo":{"DataCenter":"Canada East","Slice":"SliceC","Ring":"2","ScaleUnit":"000","RoleInstance":"AGSFE_IN_15"}}
REST API via Python is sending me a 504 error
503 | Service Unavailable | The service is temporarily unavailable for maintenance or is overloaded. You may repeat the request after a delay, the length of which may be specified in a Retry-After header.
504 | Gateway Timeout | The server, while acting as a proxy, did not receive a timely response from the upstream server it needed to access in attempting to complete the request. May occur together with 503.
Not sur how to capture the 503 but I don't think I am the subject of any rate limiting for the moment, I am just trying to get the list of pages, nothing heavy
Looking at the collection in Postman, it doesn't contain the full API spec referenced in the documentation at https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0.
Thanks for putting together this postman collection.
Is there a guide for testing it with certs (instead of the client_secret)?
After importing the environment, the docs imply that the environment is named Microsoft Graph environment when it is really named DEMO.
Scenario:
Hi.
We're a SAAS company and use hundreds of customer azure apps when querying stuff through postman.
At the moment we are having to change the auth variable in all the "On behalf of a user" requests to {{AppAccessToken}} because we never have user accounts on our customers' tenants but we do have all power azure apps that have access to everything.
Could you guys please just clone the requests from the first folder into the second one since the requests work with the {{AppAccessToken}} as well so there's no real reason to not add them in to be honest since both the usernam that's a full admin and an all-powerful azure app would have the same permissions to run all the requests.
Thanks.
Wouldn't it make sense to add the authorization header to all the requests?
I've been able to set up the collection and generate the UserAccessToken. However, the script in Tests aren't working for me. When I click the Test Results tab, I see the message "There are no tests for this request".
I followed the walkthrough lesson for running tests in Postman. They use the following demo test:
pm.test("Status code is 200", function () { pm.response.to.have.status(200); });
If I replace the test for the "Get User Access Token" with this example, the test runs. Have I missed a configuration step?
Tested (OneNote) Get Notebooks, Get sections and Get Pages - all worked like a charm - what a treasure you have created, Jeremy... Thanks a million!!
I humbly request to add PATCH to add content to an existing OneNote Page. It will be immensely useful to the community. I don't have that level of expertise... Thanks!
I added Contacts.Read under MS Graph > Application Permission > Contacts.Read and have the administrated to grand the admin consent.
But I don't know why when I retrieve the access token, it does not include Contacts.Read in scope, also when I try to decode the access_token with jwt, I don't see "Roles" in the claim.
{
"token_type": "Bearer",
"scope": "profile openid email https://graph.microsoft.com/User.Read https://graph.microsoft.com/.default",
"expires_in": 3600,
"ext_expires_in": 3600,
"access_token": "{MY_TOKEN_HERE}"
}
I hereby use the following link to get the items present in a specific list
https://graph.microsoft.com/v1.0/sites/root/lists/{{ListId}}/items
This works well until I started retrieving the items in a list. The output remains empty for any of the lists being called
Links mentioned in Step 4 for importing into Postman are incorrect. That is, following are incorrect.
Should be great to have this included in the collection. I am trying to make this connector so I can manage users in access packages in bulk via Power Automate or Azure Automation. The graph API is still in Beta and I have a hard time getting it to work.
Just watched the video, our environment is locked down with OKTA, would this still work? Also will it work in general with Microsoft MFA enabled?
Thanks.
I am just import the postman collection and follow the all steps.
After getting access token when I am using Getuser api then I am getting error.
While I am checking AccessToken is here.
{
"error": {
"code": "InvalidAuthenticationToken",
"message": "Access token is empty.",
"innerError": {
"request-id": "8accdd19-b519-434f-baa7-35dacd4c2a47",
"date": "2020-04-17T09:09:06"
}
}
}
Please suggest me where I am wrong.
there is a error (Error while importing: format not recognized )when i import the link (https://raw.githubusercontent.com/microsoftgraph/microsoftgraph-postman-collections/master/Microsoft%20Graph.postman_collection.json)
Hello,
https://login.microsoftonline.com/{{TenantID}}/oauth2/v2.0/token
But i cannot Get others event for next week
https://graph.microsoft.com/v1.0/users/{{**my_email@address**}}/calendarview?startdatetime={{Today}}&enddatetime={{NextWeek}}&$select=Subject,Start,End&$orderBy=start/dateTime&$top=1000
The response i get is 403 +
{
"error": {
"code": "ErrorAccessDenied",
"message": "Access is denied. Check credentials and try again.",
"innerError": {
"date": "2020-11-05T19:09:21",
"request-id": "25418588-04a5-48dc-ab46-40cf843f4782",
"client-request-id": "25418588-04a5-48dc-ab46-40cf843f4782"
}
}
}
https://graph.microsoft.com/Calendars.Read
https://graph.microsoft.com/Calendars.ReadWrite
https://graph.microsoft.com/User.Read
https://graph.microsoft.com/User.Read.All
https://graph.microsoft.com/User.ReadBasic.All
https://graph.microsoft.com/.default
service account
user (used to get the auth token) has (full) permission on my calendar and yet is not able to get my events.What am i missing ?
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.