Hello Abdelrhman Goma
I understand that you are facing point-to-site connection issue.
The error message you're seeing—AADSTS650057: Invalid resource—usually occurs when there's a mismatch between the Audience (resource ID) set in the VPN Gateway configuration and the permissions assigned to the Azure VPN Client app registration in Microsoft Entra ID. This means that the resource, if it exists, hasn't been set up in the tenant. The application should guide the user with steps for installing the app and adding it to Microsoft Entra ID. In development, this often points to a misconfigured test tenant or a typo in the requested scope name.
Check the reference document: https://learn.microsoft.com/en-us/entra/identity-platform/reference-error-codes#handling-error-codes-in-your-application
The Azure VPN Client is attempting to access a resource value that isn't covered by the app registration's permissions. This may happen if:
- A custom app registration is being used with the Azure VPN Client.
- The Audience value set in the VPN Gateway configuration doesn't match the app registration's resource ID.
- The app registration lacks the necessary API permissions.
You can follow the below steps to resolve your issue:
Microsoft now offers a pre-registered app for the Azure VPN Client, making configuration easier and eliminating the need for manual app registration.
- App ID (Client ID): 41b23e61-6c1e-4545-b367-cd054e0ed4b4
- Audience value: Use the same App ID as above
Please update your VPN Gateway configuration to set this App ID as the Audience. Make sure that the Audience value in the VPN Gateway is the same as the App ID of your custom app.
Check the below public document:
https://learn.microsoft.com/en-us/azure/vpn-gateway/openvpn-azure-ad-tenant#enable-authentication
https://learn.microsoft.com/en-us/azure/vpn-gateway/point-to-site-entra-users-access
Authorizing the Microsoft-registered Azure VPN Client app allows it to sign in and access user profile information. After that update the VPN gateway configuration
Once you have updated, please download the VPN client profile again and re-import it into the Azure VPN Client.
Hope the above answer helps! Please let us know do you have any further queries.
Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.