3

I have developed an Azure Workbench Application that has an administrator who can create other users(by giving name and email id) and assign them roles. The new users are created by using a REST API call here. https://votemaadi-4bm4ew-api.azurewebsites.net/swagger/ui/index.html#!/Users/UsersPost

and I assign it a role.

And later i would want the user to login with his credentials into the webapp and carry out his necessary tasks.

However, I am unable to figure out the login credentials for the new user that's created. The API (POST /api/v1/users) takes in only an email id but doesn't take in any password.

This is how i have added the new user POST to https://votemaadi-4bm4ew-api.azurewebsites.net/api/v1/users

Body contents:
{
  "externalID": "sample",
  "firstName": "sample",
  "lastName": "sample",
  "emailAddress": "sample@kumarshobhit98outlook.onmicrosoft.com"
}

and i get a 200 response

I would want to know how would the new user login to a URL like this? https://login.microsoftonline.com/kumarshobhit98outlook.onmicrosoft.com/oauth2/authorize?response_type=id_token%20code&client_id=c80344c2-d7fc-41e1-adcc-dd33683a7f6b&redirect_uri=http%3A%2F%2Flocalhost%3A5000%2Fshobhit&state=c0756113-6172-47f2-8afc-666f315c15b1&client-request-id=0de0f9e0-a2f4-4853-9bd2-7326f1f409d1&x-client-SKU=Js&x-client-Ver=1.0.17&nonce=3f993c47-3042-4669-bdce-02024f6c802f&response_mode=form_post

Shobhit Kumar
  • 555
  • 1
  • 4
  • 12

1 Answers1

1

Blockchain Workbench users need to exist in the Azure AD tenant before you can assign them to applications and roles. To add users to Azure AD, you can follow this document.

The users will have a temporary password when you create them. If you forget it, you can reset the password on Azure portal.

enter image description here

Tony Ju
  • 12,804
  • 3
  • 9
  • 24
  • so, does the user have to already created? Is there no way to create a totally new user with the APIS – Shobhit Kumar Aug 13 '19 at 19:07
  • @ShobhitKumar Sorry, I am not familiar with Azure Workbench. But based on the document, Blockchain Workbench users need to exist in the Azure AD tenant before you can assign them to applications and roles. – Tony Ju Aug 15 '19 at 07:34