How to use struct key pairs in empty map object

type ResourceAcess struct {
ID string json:"id"
Type string json:"type"
adminConsent bool default:true
}

type RequiredResourceAccess struct {
ResourceAccess []ResourceAcess json:"resourceAccess"
ResourceAppID string json:"resourceAppId"
ID string json:"id"
}
type addedpermissions struct {
RequiredResourceAccess []RequiredResourceAccess json:"requiredResourceAccess"
Type string json:"type"
ResourceAccess []ResourceAcess json:"resourceAccess"
ID string json:"id"
}

func (self *addedPermissions) addpermissions(ID string, Type string, flag bool) {
permissions := make(map[RequiredResourceAccess]addedpermissions)
a1 := ID
b1 := RequiredResourceAccess{ID: a1}
if val, ok := permissions[b1]; ok {
//permissions[b1] = val
flag = true
fmt.Println(“application id are already present…”, flag)
}
if flag == false {
for key, value := range permissions {
permissions = append(permissions,[ID: ID, Type: Type, bool: false])
fmt.Println(“application permissions are added”, permissions)
}
}
}
here i am checking resourcess id updated or not by using flag if not i need the permissions
for better understanding :
Error occured:: All attempts fail:
#1: StatusCode is not OK: 400. Body: {“error”:{“code”:“Request_BadRequest”,“message”:“Permission being assigned already exists on the object”,“details”:[{“code”:“InvalidUpdate”,“target”:“None”,“message”:“Permission being assigned already exists on the object”}],“innerError”:{“date”:“2021-12-07T06:33:48”,“request-id”:“77bfb984-987b-4830-94b2-ecb9cf5e0e06”,“client-request-id”:“77bfb984-987b-4830-94b2-ecb9cf5e0e06”}}}
pricipalID:ca52bd7f-c038-4275-ab0e-a23249cdfccd, resourceAppID:3cf1a260-0c4e-4638-a91e-a7aebcc1832e, resourceAccess ID:06b708a9-e830-4db3-a914-8e69da51d44f{“principalId”:“ca52bd7f-c038-4275-ab0e-a23249cdfccd”,“resourceId”:“3cf1a260-0c4e-4638-a91e-a7aebcc1832e”,“appRoleId”:“06b708a9-e830-4db3-a914-8e69da51d44f”}

dbaae8cf-10b5-4b86-a4a1-f871c94c6695 - is already present.
bf7b1a76-6e77-406b-b258-bf5c7720e98f - is already present.
{“requiredResourceAccess”:[{“resourceAccess”:[{“id”:“e1fe6dd8-ba31-4d61-89e7-88639da4683d”,“type”:“Scope”},{“id”:“18a4783c-866b-4cc7-a460-3d5e5662c884”,“type”:“Role”},{“id”:“1bfefb4e-e0b5-418b-a88f-73c46d2cc8e9”,“type”:“Role”},{“id”:“19dbc75e-c2e2-444c-a770-ec69d8559fc7”,“type”:“Role”},{“id”:“06b708a9-e830-4db3-a914-8e69da51d44f”,“type”:“Role”},{“id”:“ef54d2bf-783f-4e0f-bca1-3210c0444d99”,“type”:“Role”},{“id”:“6918b873-d17a-4dc1-b314-35f528134491”,“type”:“Role”},{“id”:“75359482-378d-4052-8f01-80520e7db3cd”,“type”:“Role”},{“id”:“62a82d76-70ea-41e2-9197-370581804d09”,“type”:“Role”},{“id”:“e2a3a72e-5f79-4c64-b1b1-878b674786c9”,“type”:“Role”},{“id”:“b633e1c5-b582-4048-a93e-9f11b44c7e96”,“type”:“Role”},{“id”:“b528084d-ad10-4598-8b93-929746b4d7d6”,“type”:“Role”},{“id”:“a82116e5-55eb-4c41-a434-62fe8a61c773”,“type”:“Role”},{“id”:“0c0bf378-bf22-4481-8f81-9e89a9b4960a”,“type”:“Role”},{“id”:“332a536c-c7ef-4017-ab91-336970924f0d”,“type”:“Role”},{“id”:“9492366f-7969-46a4-8d15-ed1a20078fff”,“type”:“Role”},{“id”:“0121dc95-1b9f-4aed-8bac-58c5ac466691”,“type”:“Role”},{“id”:“4437522e-9a86-4a41-a7da-e380edd4a97d”,“type”:“Role”},{“id”:“70dec828-f620-4914-aa83-a29117306807”,“type”:“Role”},{“id”:“a267235f-af13-44dc-8385-c1dc93023186”,“type”:“Role”},{“id”:“73a45059-f39c-4baf-9182-4954ac0e55cf”,“type”:“Role”},{“id”:“9f67436c-5415-4e7f-8ac1-3014a7132630”,“type”:“Role”},{“id”:“908de74d-f8b2-4d6b-a9ed-2a17b3b78179”,“type”:“Role”},{“id”:“eb6b3d76-ed75-4be6-ac36-158d04c0a555”,“type”:“Role”},{“id”:“bdd80a03-d9bc-451d-b7c4-ce7c63fe3c8f”,“type”:“Role”},{“id”:“49981c42-fd7b-4530-be03-e77b21aed25e”,“type”:“Role”},{“id”:“a96d855f-016b-47d7-b51c-1218a98d791c”,“type”:“Role”},{“id”:“23fc2474-f741-46ce-8465-674744c5c361”,“type”:“Role”},{“id”:“2280dda6-0bfd-44ee-a2f4-cb867cfc4c1e”,“type”:“Role”},{“id”:“dfb0dd15-61de-45b2-be36-d6a69fba3c79”,“type”:“Role”},{“id”:“741f803b-c850-494e-b5df-cde7c675a1ca”,“type”:“Role”},{“id”:“dbaae8cf-10b5-4b86-a4a1-f871c94c6695”,“type”:“Role”},{“id”:“bf7b1a76-6e77-406b-b258-bf5c7720e98f”,“type”:“Role”}],“resourceAppId”:“00000003-0000-0000-c000-000000000000”}]}
{[{ca52bd7f-c038-4275-ab0e-a23249cdfccd}]}