zoho creator get records from zoho project - task

I am using zoho creator and I need to fetch records from zoho projects using api ( like zoho.books.getRecords(...) ) to liste all tasks.
I need somtjing like this :
response1 = zoho.books.getRecords("Invoices",organization_id,"cf_no_de_projet=" + no_projet);

This URL lists all projects in a portal (JSON):
https://projectsapi.zoho.com/restapi/portal/<PORTAL_ID>/projects/?authtoken=<YOUR_AUTHTOKEN>
You can run a GET request in Creator with the same parameters.
If you don't know the Portal ID, you can get a list of all available portals:
https://projectsapi.zoho.com/restapi/portals?authtoken=<YOUR_AUTHTOKEN>

There is no Internal API for ZOHO Project. you must be used External API.
https://projectsapi.zoho.com/restapi/portal//projects/?authtoken=

Related

Is there a way to retrieve a meeting with no videoTeleconferenceId via /communications/onlineMeetings/

I created a meeting via POST /me/onlineMeetings (I still have the response) and now want to access it via
GET /communications/onlineMeetings
But it says i need a VTC conference id which is not present in my response...
Currently the GET onlineMeetings API can only retrieve meetings that have been created using a VTC device.
Please view our documentation for more information.
We have a note -
"Note: The GET method is currently only supported for a VTC conference id. These IDs are generated for Cloud-Video-Interop licensed users and this method is used to get the details to join the meeting."

Microsoft teams graph API(Joined team) is returning empty teams result

When accessing the joined Teams of a user(user is registered as a guest in AAD). The Microsoft Teams Graph API(Joined team) is returning an empty result. So it would be great if any feedback/help on it is available.
What is achieved till now
Able to generate the access token using secret key approach by using the admin app registration. all the request are sent using Postman
Able to fetch all user(registered guests in AAD) of AAD using the access token.
Note: I have added the guest users in newly created directory, as I want to keep the users in a separate directory for B2B implementation.
Actual results
Here is the request of Joined team api. Here 8848b4c4-c89f-4d21-95e8-c19fa9024786 is the Id of user.
Request:
https://graph.microsoft.com/beta/users/8848b4c4-c89f-4d21-95e8-c19fa9024786/joinedTeams
Response :
{
"#odata.context": "https://graph.microsoft.com/beta/$metadata#groups",
"value": []
}
Expected Result
Should be able to get the list of joined teams using this API

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 .

Microsoft Graph API SDK .NET Issues getting other users emails

I am using the Microsoft Graph SDK as downloaded from NuGet (1.2). I authenticate to Azure AD (using ADAL).
I am using Client Credentials flow (not authenticated as any particular user) and am using Application Permission roles to access resources.
We are going to set up one service mailbox with a bunch of aliases. The aliases are given to the clients. This is so they are emailing an address that has a meaningful name to them.
My app will run as a service, and routinely scan new emails in this inbox. It should find the To address, and depending on what alias was used, file the email in a location relevant to that client.
The resource I want is: GET /users/<id | userPrincipalName>/messages
However, there doesn't appear to be a method in the SDK for it.
I can get users with this:
IGraphServiceUsersCollectionPage filteredUsers =
graphApi.Users.Request()
.Filter("userPrincipalName eq 'user#domain.com'")
.GetAsync().Result;
When I loop through the collection, I can see that the User has a 'Messages' property, but it is always null.
If I manually build a request message with HttpClient I can get the messages.
The second problem is that the Recipient property is always the userPrincipalName of the mailbox. How can I get the alias that was used by the sender?
While you are able to get your collection of users successfully, you have to make another request to receive the messages. This would look something like:
IUserMessagesCollectionPage userMessages =
graphApi.Users["user_id"].Messages.Request()
.GetAsync().Result;
To answer your second question, at this time you cannot access the original recipient through the Graph API, but you can do this through EWS. This is due to the fact that you can only retrieve the SMTP message headers through EWS. You can read more about how to do this here.
If this is something you believe is valuable to you in the Graph, I would encourage you to post it in our UserVoice.
If you want to get the email as a file, you can simply get the body as bytes through the SDK:
byte[] asBytes = Encoding.Unicode.GetBytes(message.Body.ToString());

how do you build a bot for multiple people to use when you hardcode a token?

I'm using this library. In the examples, it uses a hardcoded token. If I wanted to put this app on the Slack marketplace, how do I dynamically "listen" to multiple app tokens using:
token = "xoxp-28192348123947234198234" # found at https://api.slack.com/web#authentication
sc = SlackClient(token)
if sc.rtm_connect():
while True:
print sc.rtm_read()
time.sleep(1)
Do I need to make a new bot instance for every integration?
A token = a team. If you hardcode your token, it can be used only by the team who supplied the token. That would be typical for a custom integration, but it is not compatible with an app you'd release on the Slack directory.
A typical solution is to store each token in your database (using strong encryption!) and, indeed, fire a new bot RTM connection for each team.

Resources