Is there a way to assign 'Default Role' in bulk in BIM 360? - autodesk-forge

I'd like to assign a default role to all users in BIM 360 who do not have one assigned yet.
Looking through the Forge Documentation, I haven't found the "Default Role" field represented in the Forge API. Is there a way to modify it through the Forge API? If not, is there another way to modify this field in bulk?

For adding users to the hub, the "default_role" parameter defines the user's default role in the account.
You can specify it by adding the "default_role" field when calling POST users/import endpoint.
You should specify in this field a valid name of an industry role available.
One example of a valid call to add a user with default role would contain the body below:
[{
"email": "user email",
"default_role":"some valid role name",
"default_role_id": "some valid role id"
}]
From there, when you add the user to a project from UI, it'll come with this role defined.
When you add to a project from API, the "industry_roles" parameter will define their roles (reference here).

Related

IBM Watson Assistant integration with zendesk

I followed all steps listed here to integrate IBM Watson Assistant to Zendesk
https://cloud.ibm.com/docs/assistant?topic=assistant-deploy-zendesk#deploy-zendesk-routing
But I'm struggling to find exactly how am I suppose to pass values to Zendesk. The information provided is not clear enough, and if I request an agent, there's no information about the user, it shows in zendesk like this:
The documentation says:
Specify the information by using the following syntax. Use the exact names (name and email) for the two name and value pairs.
{
user_payload : {
name: '#{customerName}',
email: '#{customerEmail}'
}
}
And after that:
Decide whether to allow unidentified users to access Zendesk.
The web chat integration allows anonymous users to initiate chats. However, as soon as you enable visitor authentication, Zendesk requires that the name and email of each user be provided. If you try to connect without passing the required information, the connection will be refused.
If you want to allow anonymous users to connect to Zendesk, you can provide fictitious name and email data. Write a function to populate the two fields with fictitious name and email values.
For example, your function must check whether you know the name and email of the current user, and if not, add canned values for them:
const userPayload = {
"name" : "Jane Doe1",
"email" : "jdoe1#example.com",
}
In my case, since users will access the assistant through a webview in an Android app, I have both name and email, and I don't need a whole authentication steps, all I want is to pass to zendesk those values, but can't exactly figure it out how. In the example, it just sets this constant but I don't know what to do with it, is there any code examples for it?
Thanks in advance
if you just want to pass the email and username to Zendesk so the agent will see them, those can be passed if you set the context of the conversation as follows
context.integrations.zendesk.pre_chat = { username: "John", email: "j#j.com"}
This should appear as tags in your agent's zendesk workspace.
If you want to use Zendesk security and have the chat authenticated, then you have to set security on for the web chat and embed a user_payload inside your JWT. (as described in the docs you have linked)

Hangouts API: Is "Room Name" exposed anywhere in API?

I've read the documentation at https://developers.google.com/hangouts/chat/reference/rest/v1/spaces/get
and I've successfully retrieved "memberships" information in JSON format using spaces.get. However, I'm not seeing anywhere I can get the room name - for example, I'd like to ideally be able to automatically log the corresponding room name that my bot is added to for the purposes of an internal process my organization uses.
Is this possible? Thanks.
Is the displayName from the response corresponds to the Room Name? You will need to indicate the type of a space - ROOM.

Empty emailAddress fields from comments and permissions API

When I attempt to query comments or permissions for a google drive file, the response has no value for the "emailAddress" field. This happens regardless of whether I include the emailAddress attribute in the 'fields' param or not.
I see that on the API reference it says: "The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester." but I'm not sure what this means?
I am also the administrator for the domain I am building an app for, so if there's a setting I need to change, that is also possible.

Box Api : Adding User Group as Collaborator return 403 Forbidden

I am trying to add collaborators through Box API, but when I am adding a user group, the api request return status 403: Forbidden.
Here is the request attributes i'm passing:
{"item": { "id": "3907701373", "type": "folder"}, "accessible_by": {"id": "400235","type":"group"}, "role": "viewer"}
And it returns me this error:
Bearer realm="Service", error="insufficient_scope", error_description="The request requires higher privileges than provided by the access token."
The documentation for Create Collaboration states that:
Errors may occur if the IDs are invalid or if the user does not have permissions to create a collaboration.
Are you able to create a collaboration with a regular user on that folder?
Follow-Up
I think the problem could be due to one, or possibly both, of the following:
Box recently introduced the Group Admin, which has permissions to "add existing users to their groups, create new users that will be assigned to their groups, and assign folder access to their groups." You may need to have those permissions in order to manage group collaborations.
Your may need to enable the Manage an Enterprise scope for your application, under OAuth2 Parameters > Scopes. If (1) above is true then your app most likely requires elevated, enterprise privileges.

Finding external shares using Google Drive

I currently have an application that will search document acls and report back on any external sharing. Since the deprecation of the document list api I would like to covert this application to Google Drive but since the user email address is no longer present in the Permission object returned from Drive is there any way to detect these shares?
Thanks.
Match the username you get from the Owner field to the users in your directory using the profile api https://developers.google.com/google-apps/profiles/. If the user is not in the directory, the user is external.
I suggest you to use 'domain' field in permission to define if your document is shared with an external user or not. You have to campare this field with the domain that you own.
Thanks,