Prompt for Access Code each time a recipient access document - docusignapi

Our DocuSign users are accessing documents by clicking on a link in an email. We are specifying an Access Code on each recipient. But we want to prompt access code each time when recipient open document. There is settings available for the same but we do not want to change that account settings manually to login in to DocuSign web console. But we want to manage this settings from DocuSign REST API. Is there any REST API available to so we can manage below account settings.
Login to the DocuSign web console (as an Administrator).
Navigate to Preferences >> Features.
In the Drop-down List labeled Authenticate on return access to
envelope, select the value "Each Access".
Click the Save button

I just found API is available to update this settings. Here are the details.
PUT /v2/accounts/{accountId}/settings
Set value of parameter "authenticationCheck" to "each_access" or "initial_access" as below.
{
"accountSettings": [
{
"name": "authenticationCheck",
"value": "each_access"
}
]
}
OR
{
"accountSettings": [
{
"name": "authenticationCheck",
"value": "initial_access"
}
]
}

Related

Shared Calendar is not showing up in azure get calendar connector for Office 365

I have a shared calendar in Office 365 with read and write permissions and I am trying to get it using Get calendar (V2) connector but it is only getting my own calendar. Is there a way to get shared calendars for Office 365 in Azure logic apps?
For this problem I did some test and it seems the "Get calendar (V2)" action in logic app can't get the calendars which others shared to you. But I provide another solution(use graph api) below for your reference:
1. You need to ask others to share a calendar to you on office 365 web page but not in outlook app.
2. Then you need to create an application in your azure AD, please refer to this tutorial.
In the application you created in azure ad above, please do the steps below:
After that, please do not forget click the "Grant admin consent for xxx" button(Maybe you need to wait a few minutes until this button become clickable).
Then click "Certificates & secrets" in your application in azure ad and new a client secret.(copy this client secret to your note book)
3. Then create a "HTTP" action in your logic app and refer to the screenshot below to request for the access token.
The "client_id" is your appliction id in azure ad, "username" and "password" is your azure user name and password, the "client_secret" is what you got above. This "HTTP" action will help us to get the access token. The response should be like below:
Then we need to parse the response data in json type, you can use "Parse JSON" action.
Use the "Body" from the "HTTP" action and fill in the "Schema" box with the code below:
{
"properties": {
"access_token": {
"type": "string"
},
"expires_in": {
"type": "integer"
},
"ext_expires_in": {
"type": "integer"
},
"scope": {
"type": "string"
},
"token_type": {
"type": "string"
}
},
"type": "object"
}
4. After that, we can create another "HTTP" action in logic app and request the graph api for all of the calendars which you can see (please note there is a space between the "Bearer" and the "access_token").
5. At last, we can get all of the calendars in the second "HTTP" action's "OUTPUTS" box.
Hope it helps~

Is there a way to get user permissions in a specific Azure Devops Project using rest api?

Hi I want to check the permissions of a user in a specific Azure Devops Project. Is there a possible way to get it? As far as I know project level permission is different than organization level permissions. Thanks.
Already test some several rest apis but still I can't have the project level permission.
There is currently no out-of-the-box rest api to get the user's permission in project.
To achieve this demand, you can use this rest api :
https://dev.azure.com/{org}/_apis/Contribution/HierarchyQuery?api-version=5.0-preview.1
Request body:
{
"contributionIds": ["ms.vss-admin-web.org-admin-permissions-pivot-data-provider"],
"dataProviderContext": {
"properties": {
"subjectDescriptor": "msa.ZjE1ZTk0NmMtOTI4OS03Mjg5LTljMGUtMDIwMTdlYmM2Nzhj",
"sourcePage": {
"url": "https://dev.azure.com/xxx/xxxx/_settings/permissions",
"routeId": "ms.vss-admin-web.project-admin-hub-route",
"routeValues": {
"action": "Execute",
"adminPivot": "permissions",
"controller": "ContributedPage",
"project": "XXX",
"serviceHost": "0933e8b2-f504-4b7e-9e9e-xxxxx (xxx)"
}
}
}
}
}
You can track this rest api by press F12 in browser then select Network .Then looking for the record that response body included returned permission. From this record you can get the rest api and request body.
I tested with postman , with this api ,I can successful get user's permission in project. As shown below:

Unable to get user properties from users imported by Azure AD

I'm using Graph to get all users on my sharepoint online site. The code works just fine expect for one example.
I've the sharepoint users is synced from azure ad, then im not able to get the properties of the user.
Here is the webApiPermissionRequests:
"webApiPermissionRequests": [
{
"resource": "Microsoft Graph",
"scope": "User.ReadBasic.All"
},
{
"resource": "Microsoft Graph",
"scope": "Contacts.Read"
},
{
"resource": "Microsoft Graph",
"scope": "User.Read.All"
}
]
The request where i get my users:
const users: MSGraphClient = this.context.serviceScope.consume(MSGraphClient.serviceKey);
users
.api("/users")
.select("displayName,mobilePhone,mail,photo,department,jobTitle,mailNickname")
.top(999)
.get((error, response: any, rawResponse?: any) => {
As i said, Everything works just fine expect when a user is imported from the Azure AD.
Can anyone tell me why all properties except displayName is null when it's an imported user.
UPDATED
I've added a picture. It' is only the Mobile Phone number (Mobiltelefon) that I'm able to get with the api above. The rest of the data and information is not being received. Let's take Office (Kontor) is coming from the azure add and is not is NOT being received in the API.
According to your description, you want to get the user's properties by MS Graph API.
Based on my test, we can get the properties. For your case, we should check the properties whose the value is null.
Check the properties in Azure AD whether it is null.

DocuSign: Can the detect when an envelope cannot be viewed by current, authenticated user via REST API

I have an application that creates an envelope via the API and stores the envelopeId, name (subject), and status.
Our application shows this envelope information and offers a "view in DocuSign" button, so that the user (who might be the sender or possibly a recipient, but maybe neither) can view the envelope in DocuSign to see its full history, or to edit it if permitted.
This button invoked createSender method in EnvelopeViews to open a browser tab on the DocuSign page. This works fine when the user is the creator of the envelope or was given shared access to the envelope by the creator. (Via DocuSign Admin.)
However, if the user isn't the creator (owner), createSender shows an empty editor page with the message, "you have no envelopes".
Edit: I have switched from createSender to CreateConsole, which is better: it takes the user to their home page when the envelope isn't accessible to them.
I understand the need for limiting access, but is there a way of detecting an envelope's ownership or the current user's rights to view it prior to generating and utilizing the createSend or createConsole methods? Then we could clearly report, "You don't have permission to view this envelope" or such.
There clearly is a concept of ownership and sharing. It is quite surprising that this information isn't available when reading the envelope's metadata.
If there is really no efficient way to know if the envelope can be viewed, I guess I'll invoke the createConsole method and let the user discover if they can view the envelope or not.
There is no way to know an envelope's ownership. But I think below solution should give you an overview if the user can access the envelope or not (either shared with him or he is the owner of the envelope).
a. Call GET /v2/accounts/{accountId}/folders this will list all the folders which user has accessto, it also includes the list of the folders for other users who has shared envelopes with this user.
b. Response to above call will list all the folderIds which this user has accessto, like below sample, It will show all the folders which this user owns or shared with this user.
{
"folders": [
{
"ownerUserName": "AnotherUser Test",
"ownerEmail": "anotheruseremail#gmail.com",
"ownerUserId": "a832164e-0da7-449c-9405-be21632564a4",
"type": "inbox",
"name": "Inbox",
"uri": "/folders/2980d14d-461b-4229-9ae7-b9d0c64371ea",
"folderId": "2980d14d-461b-4229-9ae7-b9d0c64371ea"
},
{
"ownerUserName": "AnotherUser Test",
"ownerEmail": "anotheruseremail#gmail.com",
"ownerUserId": "a832164e-0da7-449c-9405-be21632564a4",
"type": "sentitems",
"name": "Sent Items",
"uri": "/folders/507050da-3817-47be-a20c-142374a50493",
"folderId": "507050da-3817-47be-a20c-142374a50493"
},
{
"ownerUserName": "OriginalUser Test",
"ownerEmail": "amitkumar.bist+test#gmail.com",
"ownerUserId": "87b00103-461d-487b-8928-1991dfdb8d19",
"type": "inbox",
"name": "Inbox",
"uri": "/folders/b98cd590-c7b4-469a-bf7c-dd3be19d3763",
"folderId": "b98cd590-c7b4-469a-bf7c-dd3be19d3763"
}
]
}
c. Then call GET /v2/accounts/{accountId}/folders/{folderId} to know all the envelopes available in the folder. Check if your envelopeId is present in this list or not, if not then that user does not have access to that envelope.
I would try calling Envelopes::get with the potential viewer's credentials. If that call succeeds then I believe they will have access to view all of the envelope's info via the DocuSign web tool.

Microsoft graph explorer - create user & update sign in username /email

I tried to create update login username or email through Microsoft graph explorer but I am unable to do both actions. Probably the json data I am supplying might not be in correct format.
I am logged in with admin account, used PATCH method and successfully updated information by supplying below codes:
{
"displayName": "AAAlica",
"givenName": "Mews",
"passwordProfile": {
"password": "P#ssword!"
}
}
I don't know what attributes and values should I provide in order to change login username/email address. I tried different format like
{
"displayName": "AAAnamika",
"givenName": "MMews",
"userPrincipalName": "newusername#mycompanydomain#onmicrosoft.com"
}
and always getting error.
References:
graph explorer: Microsoft graph explorer
documentation: Microsoft graph api documentation
I noticed that the userPrincipalName in your post is invalid which contains two #.
The correct format should be like newusername#mycompanydomain.onmicrosoft.com. Here is the detail description for the UPN property:
The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias#domain, where domain must be present in the tenant’s collection of verified domains.

Resources