@Kothai Ramanathan (SC-ALT) - Welcome to Microsoft Q&A and thanks for reaching out to us. It seems like the error is related to the path of the module. You can try specifying the full path of the module in the Add-Type command. Here's an example:
Add-Type -Path "C:\Program Files\WindowsPowerShell\Modules\AzureAD\2.0.2.131\Microsoft.IdentityModel.Clients.ActiveDirectory.dll"
Make sure to replace the path with the actual path of the module on your system. If the module is installed in a different location, you can use the Get-Module cmdlet to find the path. This will return the path of the AzureAD module. You can then use this path in the Add-Type command. If you're still having issues, please let me know and provide more details about your environment and the specific code you're running. Hope this helps. and please feel free to reach out if you have any further questions.
If the above response was helpful, please feel free to "Accept as Answer" and click "Yes" so it can be beneficial to the community.