It can be done with the VLOOKUP function. Assuming there is no header row for the data, paste this function in cell C1.
=VLOOKUP(B1,$A$1:$A$100,1, )
If you have more than 100 rows of data, change the 100 in the formula to match the number of rows you have. Click in cell C1 then drag the handle down to the last row of data. This will copy the formula down. The function will look for the items in column B and see if they are in column A. If the item is found, column C will show the id, if not, it will show N/A. So the id’s in column B that have N/A next to them are not being used.