Is accessing projects through Roboflow API restricted to the paid plans? - roboflow

Is the project access through API only limited to paid plans. I am using a Private sandbox and when I try to access the project using the roboflow API its giving me errors.
import roboflow
rf = roboflow.Roboflow("MY-API-KEY")
project = rf.workspace().project('MY-PROJECT-NAME)
RuntimeError: {
"error": {
"message": "Unsupported get request. Dataset with ID `xxxx` does not exist or cannot be loaded due to missing permissions.",
"type": "GraphMethodException",
"hint": "You can find the API docs at https://docs.roboflow.com"
}
}

The API and pip library are available for free accounts as well.
My guess would be that the project ID isn’t quite right; this should be the unique identifier.
Does rf.workspace().projects() give you a list of your projects?

Related

Primitive Technical Error (141) when querying the flight_destinations endpoint

I'm a student creating a demo app using your test API, and am getting the following error when querying the flight destination API (eg. https://test.api.amadeus.com/v1/shopping/flight-destinations?origin=PAR&maxPrice=200)
I don't get any error when querying the same location using the flight offers search API, so it's not an issue with my key/secret, and the location is definitely included in the limited test API dataset.
I'm using the ruby gem (https://github.com/amadeus4dev/amadeus-ruby) but faced the same issue testing the API on postman.
Any help appreciated!
{
"errors": [
{
"status": 500,
"code": 141,
"title": "SYSTEM ERROR HAS OCCURRED",
"detail": "Primitive technical error"
}
]
}
I was having the same issue with the flight-deals endpoint. I submitted a request to Amadeus support and got the following reply:
Unfortunately we are currently having some issues with this API in the test environment. Our technical team is currently looking for a solution, in the meantime if you need to use this endpoint, please move your app to the production environment where the API will work as expected....in this environment you will receive a free amount of transactions each month just like in test
I did try going over to a production environment and I'm not getting technical errors (500's) any more. It does require signing up for payment in case you go beyond the free tier of request volumes. Not clear when they will have the test environment up and running.

Microsoft Graph - how to move a mail to a public folder

Microsoft Graph API provides a method to move a mail message to a different folder:
POST /users/{id | userPrincipalName}/messages/{id}/move
This works fine when moving a mail message around local folders, but returns a 404 when moving a mail message to or from a Public folder.
{
"error": {
"code": "ErrorItemNotFound",
"message": "The specified object was not found in the store., The process failed to get the correct properties.",
"innerError": {
"request-id": "53cf2d12-b551-4fa5-97c4-0d70c99013ec",
"date": "2020-04-03T16:20:08"
}
}
}
Note that the mail message is moved successfully.
The documentation is a bit unclear about support for Public folders, but most operations appear to work ok, so I'm not sure if this is something I'm doing wrong, something not supported or a bug.
Public folders are not supported by Microsoft Graph. From https://learn.microsoft.com/graph/outlook-mail-concept-overview#where-is-the-data:
Where is the data?
The Microsoft Graph API supports accessing data in users' primary
mailboxes and in shared mailboxes. The data can be calendar, mail, or
personal contacts stored in a mailbox in the cloud on Exchange Online
as part of Office 365, or on Exchange on-premises in a hybrid
deployment.
The API does not support accessing in-place archive mailboxes, not on
Exchange Online nor on Exchange Server.

Microsoft Graph API - General Exception during fetching Sites/root and drives

I created standalone application on node.js authorized in AAD with client/secret with permissions to access groups, sites, directories. I managed to create Teams group and team by Microsoft Graph API but when I tried to fetch sites/root or drives
https://graph.microsoft.com/v1.0/groups/{groupId}/sites/root
https://graph.microsoft.com/v1.0/groups/{groupId}/drive
I received 500 Internal Server Error:
{
"error": {
"code": "generalException",
"message": "An unspecified error has occurred.",
"innerError": {
"request-id": (....),
"date": "2020-01-31T09:15:17"
}
}
}
Is access to sites and drives possible by Graph API with app token?
the error is causing by using "Group.Create","Group.ReadWrite.All" together
Yes it is possible. One possibility here is that if you are attempting to access the drive or site right after creating the team, they may not be provisioned yet. There is some delay that can happen, typically only a few minutes at most.
When you register your Azure Active Directory App, which supported account type are you choosing?
I had exactly the same issue as you, but I've created a new Azure AD App and changed the supported Account type back to the first option and all worked accordingly.
I hope this could help your issue.
Thank you.

Could not obtain WAC Access Token

I am trying to create a worksheet using the Graph API and getting the below error. Everything on the URL seems right and I am unable to figure out what is causing the error. There is little help on the Graph API documentation also!
URL:
https://graph.microsoft.com/v1.0/me/drive/items/01FUAEYJMWQZF5VGFFL5G27P5AGS5M2FXD/workbook/worksheets
Error:
{
"error": {
"code": "AccessDenied",
"message": "Could not obtain a WAC access token.",
"innerError": {
"request-id": "44990b81-a8ee-489f-9fd8-d5f7c9a31bf1",
"date": "2018-05-07T14:02:08"
}
}
}
Microsoft documentation:
https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/worksheetcollection_add
Any pointers to the solution or what I might be doing wrong is appreciated. Thanks.
According to this post, "WAC is basically a designation for the Office web apps".
So this error probably means that something is tripping up the Graph server (in the file access authentication logic?), but the reported error is not specific enough, hence the generic "WAC Access Token" error.
This worked for me:
Make sure the file is in Sharepoint, not OneDrive (Microsoft Graph doesn't seem to play well with Excel files stored in OneDrive - I think I saw this on Reddit)
Is the file extension .xlsx? (According to this answer, .xltm can cause this error)
Does your user have the Files.Read permission?
Make sure you're using Delegated User permissions from and not Application permissions (GitHub issue)

How to use appRoleAssignment in Graph Api

I'm trying to leverage the beta api for assigning azure users to applications.
I looked at the documentation and tried a variety of attempts in a C# console app using HttpClient and WebClient and couldn't succeed. I then went to the Microsoft graph explorer https://developer.microsoft.com/en-us/graph/graph-explorer . I couldn't get it to work.
I looked at the documentation
https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/api/approleassignment_get
The document's actual documentation of the HTTP request which doesn't match the Example. The Graph Explorer seems to hint that the example is correct, but through various attempts, I can only get a response of
{
"error": {
"code": "Request_UnsupportedQuery",
"message": "Direct queries to this resource type are not supported.",
...
}
}
My essential url is
https://graph.microsoft.com/beta/appRoleAssignments/
The example says {id} but I have no idea what to put in. I put in several guids, user ids, object ids, resource ids, and none worked.
It isn't saying any access denied messages so I assume it has nothing to do with Scopes (all though the documentation is a little empty regarding that as well).
Ideally, I'd be able to see if for a given Guest Azure User has access to a particular App, then I'd be able to go and Update the assignment. I'll probably also need to delete the assignment as well.
[Edit (2021-07-06): Use Microsoft Graph v1.0 for all of this.]
It looks like the Microsoft Graph API's beta endpoint doesn't currently allow you to list AppRoleAssignments.
[Edit (2018-10-11): The Microsoft Graph beta endpoint now supports the ability to list AppRoleAssignments, though you should still use Azure AD Graph for any production application, until it gets to v1.0.] Fortunately, the Azure AD Graph API does work for this (plus, it's not a beta endpoint, so it's more likely to be stable).
To list all app roles a user is assigned with Microsoft Graph:
https://graph.microsoft.com/v1.0/users/{id}/appRoleAssignments
To list all app roles a group is assigned:
https://graph.microsoft.com/v1.0/groups/{id}/appRoleAssignments
To do the reverse, and list all users or groups assigned to an app:
https://graph.microsoft.com/v1.0/servicePrincipals/{id}/appRoleAssignedTo
Azure AD Graph is deprecated and all support for it will cease in June 2022. The equivalent requests were (in the same order as above):
https://graph.windows.net/{tenant-id}/users/{id}/appRoleAssignments?api-version=1.6
https://graph.windows.net/{tenant-id}/groups/{id}/appRoleAssignments?api-version=1.6
https://graph.windows.net/{tenant-id}/servicePrincipals/{id}/appRoleAssignedTo?api-version=1.6
In the new Azure portal, under "Enterprise applications" > (your app) > "Users and groups", you'll see the list of users who are assigned to the application, as well as the app role they are assigned to. After testing , you could do the equivalent thing using Microsoft Graph API request :
https://graph.microsoft.com/beta/servicePrincipals/d0790296-0a14-4ab1-8f6c-4e4d3eb03036/appRoleAssignments
Your could get the service principal under "Enterprise applications" > (your app) >Properties>Object ID .Here is sample of the response :
id is the role id , In your scenario ,you could check whether record exists when the principalId matches the object id of the specific user , and principalType is user .

Resources