{
	"info": {
		"_postman_id": "42ca00c1-594b-4768-abd3-62ba99524986",
		"name": "VGIdentityServer 2020",
		"description": "It contains API documentation. How to use VGIdentityServer?\n\nYou can have more information on [https://docs.visual-guard.com/](https://docs.visual-guard.com/)",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
		"_exporter_id": "25890945",
		"_collection_link": "https://www.postman.com/martian-water-966060/workspace/vgidentityserver/collection/25890945-42ca00c1-594b-4768-abd3-62ba99524986?action=share&creator=25890945&source=collection_link"
	},
	"item": [
		{
			"name": "Authenticate",
			"item": [
				{
					"name": "Visual-Guard User",
					"item": [
						{
							"name": "Authenticate with VG User",
							"event": [
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "test",
									"script": {
										"exec": [
											"\r",
											"\r",
											" var vgToken = pm.response.json().access_token;\r",
											" console.log(vgToken);\r",
											"\r",
											"pm.environment.set(\"BearerToken\", vgToken);\r",
											"pm.collectionVariables.set(\"BearerToken\", vgToken);"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "noauth"
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "client_id",
											"value": "{{client_id}}",
											"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
										},
										{
											"key": "client_secret",
											"value": "{{client_secret}}",
											"description": "Client_secret of the application"
										},
										{
											"key": "scope",
											"value": "{{scope}}",
											"description": "Scopes or identity resources of the application"
										},
										{
											"key": "Username",
											"value": "{{username}}",
											"description": "Username or login",
											"type": "text"
										},
										{
											"key": "Password",
											"value": "{{password}}",
											"description": "The user's password.  Delete this as soon as the response is recieved. "
										},
										{
											"key": "grant_type",
											"value": "VGAuthenticator",
											"description": "Grant type for Visual-Guard User"
										},
										{
											"key": "AuthenticationMethod",
											"value": "VisualGuard",
											"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
											"type": "text"
										}
									]
								},
								"url": {
									"raw": "{{VGIdentityServerUrl}}/connect/token",
									"host": [
										"{{VGIdentityServerUrl}}"
									],
									"path": [
										"connect",
										"token"
									]
								},
								"description": "Authenticates a visual-guard user."
							},
							"response": []
						}
					],
					"description": "Authentication of VisualGuard user accounts"
				},
				{
					"name": "Windows",
					"item": [
						{
							"name": "Authenticate with Windows by credential",
							"event": [
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "test",
									"script": {
										"exec": [
											"\r",
											"\r",
											" var vgToken = pm.response.json().access_token;\r",
											" console.log(vgToken);\r",
											"\r",
											"pm.environment.set(\"BearerToken\", vgToken);\r",
											"pm.collectionVariables.set(\"BearerToken\", vgToken);"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "noauth"
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "client_id",
											"value": "{{client_id}}",
											"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
										},
										{
											"key": "client_secret",
											"value": "{{client_secret}}",
											"description": "Client_secret of the application"
										},
										{
											"key": "scope",
											"value": "{{scope}}",
											"description": "Scopes or identity resources of the application"
										},
										{
											"key": "Username",
											"value": "{{username}}",
											"description": "Username or login"
										},
										{
											"key": "Password",
											"value": "{{password}}",
											"description": "The user's password.  Delete this as soon as the response is recieved. "
										},
										{
											"key": "grant_type",
											"value": "VGAuthenticator",
											"description": "Grant type for Visual-Guard User\n"
										},
										{
											"key": "AuthenticationMethod",
											"value": "WindowsByCredential",
											"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
											"type": "text"
										}
									]
								},
								"url": {
									"raw": "{{VGIdentityServerUrl}}/connect/token",
									"host": [
										"{{VGIdentityServerUrl}}"
									],
									"path": [
										"connect",
										"token"
									]
								},
								"description": "Authenticates a windows by credential user."
							},
							"response": []
						}
					],
					"description": "Authentication of Windows By credential user accounts"
				},
				{
					"name": "Database",
					"item": [
						{
							"name": "Authenticate with Database User",
							"event": [
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "test",
									"script": {
										"exec": [
											"\r",
											"\r",
											" var vgToken = pm.response.json().access_token;\r",
											" console.log(vgToken);\r",
											"\r",
											"pm.environment.set(\"BearerToken\", vgToken);\r",
											"pm.collectionVariables.set(\"BearerToken\", vgToken);"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "noauth"
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "client_id",
											"value": "{{client_id}}",
											"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
										},
										{
											"key": "client_secret",
											"value": "{{client_secret}}",
											"description": "Client_secret of the application"
										},
										{
											"key": "scope",
											"value": "{{scope}}",
											"description": "Scopes or identity resources of the application"
										},
										{
											"key": "Username",
											"value": "{{username}}",
											"description": "The upn of the user that wants to log in."
										},
										{
											"key": "password",
											"value": "{{password}}",
											"description": "The user's password.  Delete this as soon as the response is recieved. "
										},
										{
											"key": "grant_type",
											"value": "VGAuthenticator",
											"description": "Grant type for Visual-Guard User"
										},
										{
											"key": "AuthenticationMethod",
											"value": "Database",
											"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
											"type": "text"
										}
									]
								},
								"url": {
									"raw": "{{VGIdentityServerUrl}}/connect/token",
									"host": [
										"{{VGIdentityServerUrl}}"
									],
									"path": [
										"connect",
										"token"
									]
								},
								"description": "Authenticates with database user."
							},
							"response": []
						}
					],
					"description": "Authentication of Database user accounts"
				},
				{
					"name": "Password Less",
					"item": [
						{
							"name": "PL_SMS_OTP",
							"item": [
								{
									"name": "1 PL_Send_SMS_OTP",
									"event": [
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript"
											}
										},
										{
											"listen": "test",
											"script": {
												"exec": [
													"\r",
													"\r",
													" var vgToken = pm.response.json().access_token;\r",
													" console.log(vgToken);\r",
													"\r",
													"pm.environment.set(\"BearerToken\", vgToken);\r",
													"pm.collectionVariables.set(\"BearerToken\", vgToken);"
												],
												"type": "text/javascript"
											}
										}
									],
									"request": {
										"auth": {
											"type": "noauth"
										},
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"name": "Content-Type",
												"value": "application/json",
												"type": "text"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "client_id",
													"value": "{{client_id}}",
													"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
												},
												{
													"key": "client_secret",
													"value": "{{client_secret}}",
													"description": "Client_secret of the application"
												},
												{
													"key": "scope",
													"value": "{{scope}}",
													"description": "Scopes or identity resources of the application"
												},
												{
													"key": "Username",
													"value": "pwdlesstest",
													"description": "Username or login"
												},
												{
													"key": "grant_type",
													"value": "VGAuthenticator",
													"description": "Grant type for Visual-Guard User"
												},
												{
													"key": "AuthenticationMethod",
													"value": "Passwordless",
													"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
													"type": "text"
												},
												{
													"key": "MFAAction",
													"value": "SendOTP",
													"description": "MFA Action (ex. SendOTP,SendLink,AuthenticateOTP,CancelOTP,CancelLink)",
													"type": "text"
												},
												{
													"key": "MFAAuthenticationMode",
													"value": "OTP",
													"description": "MFA Authentication mode (ex. Link,OTP)",
													"type": "text"
												},
												{
													"key": "MFATransportMode",
													"value": "SMS",
													"description": "MFA Transportation mode (ex. SMS,Email)",
													"type": "text"
												}
											]
										},
										"url": {
											"raw": "{{VGIdentityServerUrl}}/connect/token",
											"host": [
												"{{VGIdentityServerUrl}}"
											],
											"path": [
												"connect",
												"token"
											]
										},
										"description": "It sends a request to ask for the OTP (Transport mode - SMS)."
									},
									"response": []
								},
								{
									"name": "2 PL_Authenticate_SMS_OTP",
									"event": [
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript"
											}
										},
										{
											"listen": "test",
											"script": {
												"exec": [
													"\r",
													"\r",
													" var vgToken = pm.response.json().access_token;\r",
													" console.log(vgToken);\r",
													"\r",
													"pm.environment.set(\"BearerToken\", vgToken);\r",
													"pm.collectionVariables.set(\"BearerToken\", vgToken);"
												],
												"type": "text/javascript"
											}
										}
									],
									"request": {
										"auth": {
											"type": "noauth"
										},
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"name": "Content-Type",
												"value": "application/json",
												"type": "text"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "client_id",
													"value": "{{client_id}}",
													"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
												},
												{
													"key": "client_secret",
													"value": "{{client_secret}}",
													"description": "Client_secret of the application"
												},
												{
													"key": "scope",
													"value": "{{scope}}",
													"description": "Scopes or identity resources of the application"
												},
												{
													"key": "Username",
													"value": "pwdlesstest",
													"description": "Username or login",
													"type": "text"
												},
												{
													"key": "grant_type",
													"value": "VGAuthenticator",
													"description": "Grant type for Visual-Guard User"
												},
												{
													"key": "AuthenticationMethod",
													"value": "Passwordless",
													"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
													"type": "text"
												},
												{
													"key": "MFAAction",
													"value": "AuthenticateOTP",
													"description": "MFA Action (ex. SendOTP,SendLink,AuthenticateOTP,CancelOTP,CancelLink)",
													"type": "text"
												},
												{
													"key": "MFAAuthenticationMode",
													"value": "OTP",
													"description": "MFA Authentication mode (ex. Link,OTP)",
													"type": "text"
												},
												{
													"key": "MFATransportMode",
													"value": "SMS",
													"description": "MFA Transportation mode (ex. SMS,Email)",
													"type": "text"
												},
												{
													"key": "MFASecureCode",
													"value": "334603",
													"description": "MFA Secure Code (OTP)",
													"type": "text"
												}
											]
										},
										"url": {
											"raw": "{{VGIdentityServerUrl}}/connect/token",
											"host": [
												"{{VGIdentityServerUrl}}"
											],
											"path": [
												"connect",
												"token"
											]
										},
										"description": "It sends a request for authentication of OTP (Transport mode - SMS)"
									},
									"response": []
								}
							]
						},
						{
							"name": "PL_SMS_LINK",
							"item": [
								{
									"name": "1 PL_Send_SMS_Link",
									"event": [
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript"
											}
										},
										{
											"listen": "test",
											"script": {
												"exec": [
													"\r",
													"\r",
													" var vgToken = pm.response.json().access_token;\r",
													" console.log(vgToken);\r",
													"\r",
													"pm.environment.set(\"BearerToken\", vgToken);\r",
													"pm.collectionVariables.set(\"BearerToken\", vgToken);"
												],
												"type": "text/javascript"
											}
										}
									],
									"request": {
										"auth": {
											"type": "noauth"
										},
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"name": "Content-Type",
												"value": "application/json",
												"type": "text"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "client_id",
													"value": "{{client_id}}",
													"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
												},
												{
													"key": "client_secret",
													"value": "{{client_secret}}",
													"description": "Client_secret of the application"
												},
												{
													"key": "scope",
													"value": "{{scope}}",
													"description": "Scopes or identity resources of the application"
												},
												{
													"key": "Username",
													"value": "pwdlesstest",
													"description": "Username or login"
												},
												{
													"key": "grant_type",
													"value": "VGAuthenticator",
													"description": "Grant type for Visual-Guard User"
												},
												{
													"key": "AuthenticationMethod",
													"value": "Passwordless",
													"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)"
												},
												{
													"key": "MFAAction",
													"value": "SendLink",
													"description": "MFA Action (ex. SendOTP,SendLink,AuthenticateOTP,CancelOTP,CancelLink)",
													"type": "text"
												},
												{
													"key": "MFAAuthenticationMode",
													"value": "Link",
													"description": "MFA Authentication mode (ex. Link,OTP)",
													"type": "text"
												},
												{
													"key": "MFATransportMode",
													"value": "SMS",
													"description": "MFA Transportation mode (ex. SMS,Email)",
													"type": "text"
												}
											]
										},
										"url": {
											"raw": "{{VGIdentityServerUrl}}/connect/token",
											"host": [
												"{{VGIdentityServerUrl}}"
											],
											"path": [
												"connect",
												"token"
											]
										},
										"description": "It sends a requeset for authentication via Link (TransportMode - SMS)."
									},
									"response": []
								}
							]
						},
						{
							"name": "PL_EMAIL_OTP",
							"item": [
								{
									"name": "1 PL_Send_EMAIL_OTP",
									"event": [
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript"
											}
										},
										{
											"listen": "test",
											"script": {
												"exec": [
													"\r",
													"\r",
													" var vgToken = pm.response.json().access_token;\r",
													" console.log(vgToken);\r",
													"\r",
													"pm.environment.set(\"BearerToken\", vgToken);\r",
													"pm.collectionVariables.set(\"BearerToken\", vgToken);"
												],
												"type": "text/javascript"
											}
										}
									],
									"request": {
										"auth": {
											"type": "noauth"
										},
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"name": "Content-Type",
												"value": "application/json",
												"type": "text"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "client_id",
													"value": "{{client_id}}",
													"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
												},
												{
													"key": "client_secret",
													"value": "{{client_secret}}",
													"description": "Client_secret of the application"
												},
												{
													"key": "scope",
													"value": "{{scope}}",
													"description": "Scopes or identity resources of the application"
												},
												{
													"key": "Username",
													"value": "pwdlesstest",
													"description": "Username or login",
													"type": "text"
												},
												{
													"key": "grant_type",
													"value": "VGAuthenticator",
													"description": "Grant type for Visual-Guard User",
													"type": "text"
												},
												{
													"key": "AuthenticationMethod",
													"value": "Passwordless",
													"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
													"type": "text"
												},
												{
													"key": "MFAAction",
													"value": "SendOTP",
													"description": "MFA Action (ex. SendOTP,SendLink,AuthenticateOTP,CancelOTP,CancelLink)",
													"type": "text"
												},
												{
													"key": "MFAAuthenticationMode",
													"value": "OTP",
													"description": "MFA Authentication mode (ex. Link,OTP)",
													"type": "text"
												},
												{
													"key": "MFATransportMode",
													"value": "Email",
													"description": "MFA Transportation mode (ex. SMS,Email)",
													"type": "text"
												}
											]
										},
										"url": {
											"raw": "{{VGIdentityServerUrl}}/connect/token",
											"host": [
												"{{VGIdentityServerUrl}}"
											],
											"path": [
												"connect",
												"token"
											]
										},
										"description": "It sends a request to ask for the OTP (Transport mode - Email)"
									},
									"response": []
								},
								{
									"name": "2 PL_Authenticate_EMAIL_OTP",
									"event": [
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript"
											}
										},
										{
											"listen": "test",
											"script": {
												"exec": [
													"\r",
													"\r",
													" var vgToken = pm.response.json().access_token;\r",
													" console.log(vgToken);\r",
													"\r",
													"pm.environment.set(\"BearerToken\", vgToken);\r",
													"pm.collectionVariables.set(\"BearerToken\", vgToken);"
												],
												"type": "text/javascript"
											}
										}
									],
									"request": {
										"auth": {
											"type": "noauth"
										},
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"name": "Content-Type",
												"value": "application/json",
												"type": "text"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "client_id",
													"value": "{{client_id}}",
													"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
												},
												{
													"key": "client_secret",
													"value": "{{client_secret}}",
													"description": "Client_secret of the application"
												},
												{
													"key": "scope",
													"value": "{{scope}}",
													"description": "Scopes or identity resources of the application"
												},
												{
													"key": "Username",
													"value": "pwdlesstest",
													"description": "Username or login",
													"type": "text"
												},
												{
													"key": "grant_type",
													"value": "VGAuthenticator",
													"description": "Grant type for Visual-Guard User"
												},
												{
													"key": "AuthenticationMethod",
													"value": "Passwordless",
													"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
													"type": "text"
												},
												{
													"key": "MFAAction",
													"value": "AuthenticateOTP",
													"description": "MFA Action (ex. SendOTP,SendLink,AuthenticateOTP,CancelOTP,CancelLink)",
													"type": "text"
												},
												{
													"key": "MFAAuthenticationMode",
													"value": "OTP",
													"description": "MFA Authentication mode (ex. Link,OTP)",
													"type": "text"
												},
												{
													"key": "MFATransportMode",
													"value": "Email",
													"description": "MFA Transportation mode (ex. SMS,Email)",
													"type": "text"
												},
												{
													"key": "MFASecureCode",
													"value": "545227",
													"description": "MFA Secure Code (OTP)",
													"type": "text"
												}
											]
										},
										"url": {
											"raw": "{{VGIdentityServerUrl}}/connect/token",
											"host": [
												"{{VGIdentityServerUrl}}"
											],
											"path": [
												"connect",
												"token"
											]
										},
										"description": "It sends a request for authentication of OTP (Transport mode - Email)"
									},
									"response": []
								}
							]
						},
						{
							"name": "PL_EMAIL_LINK",
							"item": [
								{
									"name": "1 PL_Send_EMAIL_Link",
									"event": [
										{
											"listen": "prerequest",
											"script": {
												"exec": [
													""
												],
												"type": "text/javascript"
											}
										},
										{
											"listen": "test",
											"script": {
												"exec": [
													"\r",
													"\r",
													" var vgToken = pm.response.json().access_token;\r",
													" console.log(vgToken);\r",
													"\r",
													"pm.environment.set(\"BearerToken\", vgToken);\r",
													"pm.collectionVariables.set(\"BearerToken\", vgToken);"
												],
												"type": "text/javascript"
											}
										}
									],
									"request": {
										"auth": {
											"type": "noauth"
										},
										"method": "POST",
										"header": [
											{
												"key": "Content-Type",
												"name": "Content-Type",
												"value": "application/json",
												"type": "text"
											}
										],
										"body": {
											"mode": "urlencoded",
											"urlencoded": [
												{
													"key": "client_id",
													"value": "{{client_id}}",
													"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
												},
												{
													"key": "client_secret",
													"value": "{{client_secret}}",
													"description": "Client_secret of the application"
												},
												{
													"key": "scope",
													"value": "{{scope}}",
													"description": "Scopes or identity resources of the application"
												},
												{
													"key": "Username",
													"value": "pwdlesstest",
													"description": "Username or login",
													"type": "text"
												},
												{
													"key": "grant_type",
													"value": "VGAuthenticator",
													"description": "Grant type for Visual-Guard User"
												},
												{
													"key": "AuthenticationMethod",
													"value": "Passwordless",
													"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
													"type": "text"
												},
												{
													"key": "MFAAction",
													"value": "SendLink",
													"description": "MFA Action (ex. SendOTP,SendLink,AuthenticateOTP,CancelOTP,CancelLink)",
													"type": "text"
												},
												{
													"key": "MFAAuthenticationMode",
													"value": "Link",
													"description": "MFA Authentication mode (ex. Link,OTP)",
													"type": "text"
												},
												{
													"key": "MFATransportMode",
													"value": "Email",
													"description": "MFA Transportation mode (ex. SMS,Email)",
													"type": "text"
												}
											]
										},
										"url": {
											"raw": "{{VGIdentityServerUrl}}/connect/token",
											"host": [
												"{{VGIdentityServerUrl}}"
											],
											"path": [
												"connect",
												"token"
											]
										},
										"description": "It sends a requeset for authentication via Link (TransportMode - Email)."
									},
									"response": []
								}
							]
						}
					],
					"description": "Authentication of Passwordless accounts"
				},
				{
					"name": "Okta (Beta not yet available)",
					"item": [
						{
							"name": "Authenticate with Okta user",
							"event": [
								{
									"listen": "prerequest",
									"script": {
										"exec": [
											""
										],
										"type": "text/javascript"
									}
								},
								{
									"listen": "test",
									"script": {
										"exec": [
											"\r",
											"\r",
											" var vgToken = pm.response.json().access_token;\r",
											" console.log(vgToken);\r",
											"\r",
											"pm.environment.set(\"BearerToken\", vgToken);\r",
											"pm.collectionVariables.set(\"BearerToken\", vgToken);"
										],
										"type": "text/javascript"
									}
								}
							],
							"request": {
								"auth": {
									"type": "noauth"
								},
								"method": "POST",
								"header": [
									{
										"key": "Content-Type",
										"name": "Content-Type",
										"value": "application/json",
										"type": "text"
									}
								],
								"body": {
									"mode": "urlencoded",
									"urlencoded": [
										{
											"key": "client_id",
											"value": "{{client_id}}",
											"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
										},
										{
											"key": "client_secret",
											"value": "{{client_secret}}",
											"description": "Client_secret of the application"
										},
										{
											"key": "scope",
											"value": "{{scope}}",
											"description": "Scopes or identity resources of the application"
										},
										{
											"key": "Username",
											"value": "{{username}}",
											"description": "Username or login"
										},
										{
											"key": "Password",
											"value": "{{password}}",
											"description": "The user's password.  Delete this as soon as the response is recieved."
										},
										{
											"key": "grant_type",
											"value": "VGAuthenticator",
											"description": "Grant type for Visual-Guard User"
										},
										{
											"key": "AuthenticationMethod",
											"value": "OKTA",
											"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
											"type": "text"
										}
									]
								},
								"url": {
									"raw": "{{VGIdentityServerUrl}}/connect/token",
									"host": [
										"{{VGIdentityServerUrl}}"
									],
									"path": [
										"connect",
										"token"
									]
								},
								"description": "Authenticates an OKTA user."
							},
							"response": []
						}
					],
					"description": "Not yet available (Beta purpose)\n\nAuthentication of Okta user accounts"
				}
			],
			"description": "This folder contains all methods for authentication (VisualGuard, Windows, Database, Passwordless, etc.)"
		},
		{
			"name": "User",
			"item": [
				{
					"name": "GetAllUsers",
					"event": [
						{
							"listen": "test",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"body": {
							"mode": "formdata",
							"formdata": []
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/User/GetAllUsers?pageIndex=0&pageSize=10&isLoadProfileValues=true",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"User",
								"GetAllUsers"
							],
							"query": [
								{
									"key": "pageIndex",
									"value": "0",
									"description": "PageIndex"
								},
								{
									"key": "pageSize",
									"value": "10",
									"description": "PageSize"
								},
								{
									"key": "isLoadProfileValues",
									"value": "true",
									"description": "Set it to true, If also want to load profile values for user"
								}
							]
						},
						"description": "Gets all users."
					},
					"response": []
				},
				{
					"name": "GetProfileValues",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/User/GetProfileValues?userId=test",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"User",
								"GetProfileValues"
							],
							"query": [
								{
									"key": "userId",
									"value": "test",
									"description": "UserId"
								}
							]
						},
						"description": "Gets all profile values for user."
					},
					"response": []
				},
				{
					"name": "ChangePassword",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Username\": \"test\",\r\n  \"OldPassword\": \"test1\",\r\n  \"NewPassword\": \"test\",\r\n  \"PasswordConfirmation\": \"test\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/User/ChangePassword",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"User",
								"ChangePassword"
							]
						},
						"description": "Changes the password of the user by old password."
					},
					"response": []
				},
				{
					"name": "GetQuestionForChangePassword",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Username\": \"test\",\r\n  \"AuthenticationMode\": \"VisualGuard\" \r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/User/GetQuestionForChangePassword",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"User",
								"GetQuestionForChangePassword"
							]
						},
						"description": "Gets the secret question for changing password by username."
					},
					"response": []
				},
				{
					"name": "ForcePassword",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"UserId\": \"test\",\r\n  \"NewPassword\": \"pwd\",\r\n  \"PasswordConfirmation\" : \"pwd\" \r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/User/ForcePassword",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"User",
								"ForcePassword"
							]
						},
						"description": "Sets the new password of the user.\n\nRequires permissions:\n\n1) Read User 2) CanForcePassword permission"
					},
					"response": []
				},
				{
					"name": "WriteLog",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Title\": \"Testing from Postman\",\r\n  \"Message\": \"Testing from Postman-Admin\",\r\n  \"EventId\": 108,\r\n  \"Severity\": \"1\",\r\n  \"ApplicationId\": \"7503e1ea-212a-4903-abb6-93702214fa87\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/User/WriteLog",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"User",
								"WriteLog"
							]
						},
						"description": "Writes a log for the user."
					},
					"response": []
				},
				{
					"name": "ChangePasswordByAnswer",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Username\": \"test\",\r\n  \"Answer\": \"test1\",\r\n  \"NewPassword\": \"test\",\r\n  \"PasswordConfirmation\": \"test\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/User/ChangePasswordByAnswer",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"User",
								"ChangePasswordByAnswer"
							]
						},
						"description": "Changes the password of the user by answer of the secret question."
					},
					"response": []
				}
			],
			"description": "It contains methods for user operations."
		},
		{
			"name": "Role",
			"item": [
				{
					"name": "GetAllRoles",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Role/GetAllRoles?applicationId=a8f29316-c16e-4a21-8a21-c753dfedec66&onlyActiveRoleAndGrantedToUsers=true&isLoadMemberShipRoles=true&isLoadProfileValues=false",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Role",
								"GetAllRoles"
							],
							"query": [
								{
									"key": "applicationId",
									"value": "a8f29316-c16e-4a21-8a21-c753dfedec66",
									"description": "Id of the application"
								},
								{
									"key": "onlyActiveRoleAndGrantedToUsers",
									"value": "true",
									"description": "Set it to true, if only want to load roles which are active and granted to users"
								},
								{
									"key": "isLoadMemberShipRoles",
									"value": "true",
									"description": "Set it to true, if want to include membership roles also"
								},
								{
									"key": "isLoadProfileValues",
									"value": "false",
									"description": "Set it to true, if want to load role's profile values also"
								}
							]
						},
						"description": "Gets all roles."
					},
					"response": []
				},
				{
					"name": "ContainsPermission",
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {}
					},
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"RoleId\": \"72ee1b3d-2e9e-48d8-a7bf-0b8d4121d9f0\",\r\n  \"PermissionId\": \"f2a1d508-1920-41cb-9ef9-0b5a4e078ee4\"  \r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Role/ContainsPermission",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Role",
								"ContainsPermission"
							]
						},
						"description": "Checks whether a role contains given permission or not."
					},
					"response": []
				},
				{
					"name": "GrantRolesToUsers",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Roles\": [\r\n    {\r\n      \"RoleId\": \"17395782-ca09-4602-b43b-4e774ab89b1e\",\r\n      \"AppId\": \"ac60cfa1-8416-4d56-a50b-71bebeeb3b45\"\r\n    }\r\n  ],\r\n  \"UserIds\": [\r\n    \"pbuser\"\r\n  ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Role/GrantRolesToUsers",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Role",
								"GrantRolesToUsers"
							]
						},
						"description": "Grants role(s) to the user(s)."
					},
					"response": []
				},
				{
					"name": "RevokeRolesFromUsers",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Roles\": [\r\n    {\r\n      \"RoleId\": \"17395782-ca09-4602-b43b-4e774ab89b1e\",\r\n      \"AppId\": \"ac60cfa1-8416-4d56-a50b-71bebeeb3b45\"\r\n    }\r\n  ],\r\n  \"UserIds\": [\r\n    \"pbuser\"\r\n  ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Role/RevokeRolesFromUsers",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Role",
								"RevokeRolesFromUsers"
							]
						},
						"description": "Revokes role(s) from the user(s)."
					},
					"response": []
				}
			],
			"description": "It contains methods for role operations."
		},
		{
			"name": "Application",
			"item": [
				{
					"name": "UpdateProfileValue",
					"event": [
						{
							"listen": "prerequest",
							"script": {
								"exec": [
									""
								],
								"type": "text/javascript"
							}
						}
					],
					"protocolProfileBehavior": {
						"disabledSystemHeaders": {
							"content-type": true
						}
					},
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"value": "application/json",
								"type": "text"
							}
						],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"PropertyName\": \"CompanyName\",\r\n  \"PropertyValue\": \"ABC\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Application/UpdateProfileValue",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Application",
								"UpdateProfileValue"
							],
							"query": [
								{
									"key": "PropertyName",
									"value": "CompanyName",
									"disabled": true
								},
								{
									"key": "PropertyValue",
									"value": "AA",
									"disabled": true
								}
							]
						},
						"description": "Updates profile value for given attribute for a given application. (If applicationId is not provided, it will process for current application by default)"
					},
					"response": []
				},
				{
					"name": "GetAllApplications",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Application/GetAllApplications?isLoadProfileValues=true",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Application",
								"GetAllApplications"
							],
							"query": [
								{
									"key": "isLoadProfileValues",
									"value": "true",
									"description": "Set it to true, if want to load application's profile values also"
								}
							]
						},
						"description": "Gets all applications"
					},
					"response": []
				},
				{
					"name": "GetCurrentApplication",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Application/GetCurrentApplication?isLoadProfileValues=true",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Application",
								"GetCurrentApplication"
							],
							"query": [
								{
									"key": "isLoadProfileValues",
									"value": "true",
									"description": "Set it to true, if want to load application's profile values also"
								}
							]
						},
						"description": "Gets current application for which the user has been authenticated to."
					},
					"response": []
				},
				{
					"name": "GetAllProfileAttributes",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Application/GetAllProfileAttributes",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Application",
								"GetAllProfileAttributes"
							]
						},
						"description": "Gets all profile attributes and values for given application if specified, if not specified, it will take current application."
					},
					"response": []
				}
			],
			"description": "It contains methods for application operations."
		},
		{
			"name": "Principal",
			"item": [
				{
					"name": "GetPrincipal",
					"protocolProfileBehavior": {
						"disableBodyPruning": true
					},
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [
							{
								"key": "Content-Type",
								"name": "Content-Type",
								"value": "application/x-www-form-urlencoded",
								"type": "text",
								"disabled": true
							}
						],
						"body": {
							"mode": "raw",
							"raw": ""
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetPrincipal",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetPrincipal"
							]
						},
						"description": "Gets current principal."
					},
					"response": []
				},
				{
					"name": "SetProfileValue",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"PropertyName\": \"int\",\r\n  \"PropertyValue\": \"45\"\r\n  \r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/SetProfileValue",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"SetProfileValue"
							]
						},
						"description": "Sets profile values for current principal."
					},
					"response": []
				},
				{
					"name": "GetProfileValues",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetProfileValues",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetProfileValues"
							]
						},
						"description": "Gets all profile values of the current principal."
					},
					"response": []
				},
				{
					"name": "ChangePassword",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"NewPassword\": \"Admin@123\",\r\n  \"PasswordConfirmation\": \"Admin@123\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/ChangePassword",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"ChangePassword"
							]
						},
						"description": "Changes the password of the current principal."
					},
					"response": []
				},
				{
					"name": "SelectContextualRoles",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Ids\": [\r\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\r\n  ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/SelectContextualRoles",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"SelectContextualRoles"
							]
						},
						"description": "Selects contextual roles for current principal and returns updated principal (To get the selectable contextual roles, call method - GetAllSelectableContextualRoles()."
					},
					"response": []
				},
				{
					"name": "SelectContextualGroups",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Ids\": [\r\n    \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\r\n  ]\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/SelectContextualGroups",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"SelectContextualGroups"
							]
						},
						"description": "Selects contextual groups for current principal and returns updated principal. (To get the selectable contextual groups, call method - GetAllSelectableContextualGroups() )."
					},
					"response": []
				},
				{
					"name": "SignOut",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/SignOut",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"SignOut"
							]
						},
						"description": "SignOuts the current user."
					},
					"response": []
				},
				{
					"name": "WriteLog",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "POST",
						"header": [],
						"body": {
							"mode": "raw",
							"raw": "{\r\n  \"Title\": \"Testing from Postman\",\r\n  \"Message\": \"Testing from Postman-Admin\",\r\n  \"EventId\": 108,\r\n  \"Severity\": \"1\",\r\n  \"ApplicationId\": \"7503e1ea-212a-4903-abb6-93702214fa87\"\r\n}",
							"options": {
								"raw": {
									"language": "json"
								}
							}
						},
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/WriteLog",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"WriteLog"
							]
						},
						"description": "Writes a log for current principal."
					},
					"response": []
				},
				{
					"name": "GetIdentity",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetIdentity",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetIdentity"
							]
						},
						"description": "Gets the identity of your current user."
					},
					"response": []
				},
				{
					"name": "GetCurrentPermissions",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetCurrentPermissions",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetCurrentPermissions"
							]
						},
						"description": "Gets all permissions for current principal."
					},
					"response": []
				},
				{
					"name": "GetCurrentRoles",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetCurrentRoles",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetCurrentRoles"
							]
						},
						"description": "Gets all roles for current principal."
					},
					"response": []
				},
				{
					"name": "IsInRoleById",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/IsInRoleById?roleId=72ee1b3d-2e9e-48d8-a7bf-0b8d4121d9f0",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"IsInRoleById"
							],
							"query": [
								{
									"key": "roleId",
									"value": "72ee1b3d-2e9e-48d8-a7bf-0b8d4121d9f0",
									"description": "Id of the role to check"
								}
							]
						},
						"description": "Does the user have a role (role ID), Returns true, else false."
					},
					"response": []
				},
				{
					"name": "IsInRoleByName",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/IsInRoleByName?roleName=Admin",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"IsInRoleByName"
							],
							"query": [
								{
									"key": "roleName",
									"value": "Admin",
									"description": "Name of the role to check"
								}
							]
						},
						"description": "Does the user have a role (role name), Returns true, else false."
					},
					"response": []
				},
				{
					"name": "HasPermissionById",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/HasPermissionById?permissionId=8bdf5823-7852-4665-8829-2d2c71d0865f",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"HasPermissionById"
							],
							"query": [
								{
									"key": "permissionId",
									"value": "8bdf5823-7852-4665-8829-2d2c71d0865f",
									"description": "Id of the Permission to check"
								}
							]
						},
						"description": "Does the user have a permission (permissionId), Returns true, else false"
					},
					"response": []
				},
				{
					"name": "HasPermissionByName",
					"request": {
						"auth": {
							"type": "bearer",
							"bearer": [
								{
									"key": "token",
									"value": "{{BearerToken}}",
									"type": "string"
								}
							]
						},
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/HasPermissionByName?permissionName=/PowerServer/Address/CanCreateAddress",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"HasPermissionByName"
							],
							"query": [
								{
									"key": "permissionName",
									"value": "/PowerServer/Address/CanCreateAddress",
									"description": "Name of the Permission to check"
								}
							]
						},
						"description": "Does the user have a permission (permissionName), Returns true else false."
					},
					"response": []
				},
				{
					"name": "GetAllSelectableContextualGroups",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetAllSelectableContextualGroups",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetAllSelectableContextualGroups"
							]
						},
						"description": "Gets all selectable contextual groups for current principal."
					},
					"response": []
				},
				{
					"name": "GetSelectedContextualGroups",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetSelectedContextualGroups",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetSelectedContextualGroups"
							]
						},
						"description": "Gets selected contextual groups for current principal."
					},
					"response": []
				},
				{
					"name": "GetAllSelectableContextualRoles",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetAllSelectableContextualRoles",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetAllSelectableContextualRoles"
							]
						},
						"description": "Gets all selectable contextual roles for current principal."
					},
					"response": []
				},
				{
					"name": "GetSelectedContextualRoles",
					"request": {
						"method": "GET",
						"header": [],
						"url": {
							"raw": "{{VGIdentityServerUrl}}/api/Principal/GetSelectedContextualRoles",
							"host": [
								"{{VGIdentityServerUrl}}"
							],
							"path": [
								"api",
								"Principal",
								"GetSelectedContextualRoles"
							]
						},
						"description": "Gets selected contextual roles for current principal."
					},
					"response": []
				}
			],
			"description": "It contains methods for principal operations."
		},
		{
			"name": "ConnectToken",
			"event": [
				{
					"listen": "prerequest",
					"script": {
						"exec": [
							""
						],
						"type": "text/javascript"
					}
				},
				{
					"listen": "test",
					"script": {
						"exec": [
							"\r",
							"\r",
							" var vgToken = pm.response.json().access_token;\r",
							" console.log(vgToken);\r",
							"\r",
							"pm.environment.set(\"BearerToken\", vgToken);\r",
							"pm.collectionVariables.set(\"BearerToken\", vgToken);"
						],
						"type": "text/javascript"
					}
				}
			],
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "client_id",
							"value": "{{client_id}}",
							"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
						},
						{
							"key": "client_secret",
							"value": "{{client_secret}}",
							"description": "Client_secret of the application"
						},
						{
							"key": "scope",
							"value": "{{scope}}",
							"description": "Scopes or identity resources of the application"
						},
						{
							"key": "Username",
							"value": "{{username}}",
							"description": "Username or login"
						},
						{
							"key": "password",
							"value": "{{password}}",
							"description": "The user's password.  Delete this as soon as the response is recieved. "
						},
						{
							"key": "grant_type",
							"value": "VGAuthenticator",
							"description": "Grant type for Visual-Guard User"
						},
						{
							"key": "AuthenticationMethod",
							"value": "VisualGuard",
							"description": "Authentication mode (ex. VisualGuard, Windows, WindowsByCredential, Passwordless, OKTA, Database etc)",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{VGIdentityServerUrl}}/connect/token",
					"host": [
						"{{VGIdentityServerUrl}}"
					],
					"path": [
						"connect",
						"token"
					]
				},
				"description": "Connects to the token endpoint for authentication and generates the VGAccessToken.\n\nThis VGAccessToken can be used to access the visual-guard api."
			},
			"response": []
		},
		{
			"name": "RefreshToken",
			"request": {
				"auth": {
					"type": "noauth"
				},
				"method": "POST",
				"header": [
					{
						"key": "Content-Type",
						"name": "Content-Type",
						"value": "application/json",
						"type": "text"
					}
				],
				"body": {
					"mode": "urlencoded",
					"urlencoded": [
						{
							"key": "client_id",
							"value": "{{client_id}}",
							"description": "Client_id of the application. (ex. 6f209594-fc04-4e96-9f9f-7daf57b0fb12_Native) (Guid_Type of application)"
						},
						{
							"key": "client_secret",
							"value": "{{client_secret}}",
							"description": "Client_secret of the application"
						},
						{
							"key": "scope",
							"value": "{{scope}}",
							"description": "Scopes or identity resources of the application"
						},
						{
							"key": "grant_type",
							"value": "refresh_token",
							"description": "refresh_token"
						},
						{
							"key": "refresh_token",
							"value": "c854d8162133f95dd27c487a6475c6ea98531da68f0835aa6e66dce2cb0cb2bb",
							"description": "Provide Refresh token",
							"type": "text"
						}
					]
				},
				"url": {
					"raw": "{{VGIdentityServerUrl}}/connect/token",
					"host": [
						"{{VGIdentityServerUrl}}"
					],
					"path": [
						"connect",
						"token"
					]
				},
				"description": "Connects to the refreh token endpoint for renewing the VGAccessToken based on last refreshtoken."
			},
			"response": []
		},
		{
			"name": "GetUserInfo (UserInfo endpoint)",
			"protocolProfileBehavior": {
				"disableBodyPruning": true
			},
			"request": {
				"auth": {
					"type": "bearer",
					"bearer": [
						{
							"key": "token",
							"value": "{{BearerToken}}",
							"type": "string"
						}
					]
				},
				"method": "GET",
				"header": [],
				"body": {
					"mode": "urlencoded",
					"urlencoded": []
				},
				"url": {
					"raw": "{{VGIdentityServerUrl}}/connect/userinfo",
					"host": [
						"{{VGIdentityServerUrl}}"
					],
					"path": [
						"connect",
						"userinfo"
					]
				},
				"description": "Connects to the user-info endpoint to have the identity information of the user. This can be accessed by providing the VGAccessToken."
			},
			"response": []
		}
	],
	"event": [
		{
			"listen": "prerequest",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		},
		{
			"listen": "test",
			"script": {
				"type": "text/javascript",
				"exec": [
					""
				]
			}
		}
	],
	"variable": [
		{
			"key": "{{BearerToken}}",
			"value": ""
		},
		{
			"key": "BearerToken",
			"value": ""
		},
		{
			"key": "{{SERVER_URL}}",
			"value": ""
		}
	]
}