Azure connectivity and Access error error code 403 - azure

Error 1: Failed to load one or more resources due to no access, error code 403.
I checked with the answers here but they don't work for me. As the screenshots below suggest, I am the service administrator, owner and contributor of the Synapse workspace. I also allow public access to the Synapse workspace.
Error 2: If I check the access control on Synapse studio portal, it says I am not the synapse administrator but I am actually the service administrator of the entire subscription.
Error 3: Cannot create an SQL pool.

The Azure IAM/RBAC roles are for working with the Azure resource, but the Synapse workspace also has its own access control. You will need to grant permissions/RBAC inside the workspace itself. [documentation]
I recommend using Groups to manage permissions, but you can start by adding yourself as a Synapse Administrator.

For Error1: You may try the following steps and let us know.
This article - Disabling Public Network Access in Synapse helps to resolve the issue.
For Error2:Make sure you have Synapse Administrator role in the Manage => Security => Access Control
For more details, refer to Grant access to SQL pools.

Related

Why credentials used by an Azure Function running locally don't work even if the same credentials work in the Azure Portal?

An Azure Function locally using Visual Studio is not authorized to read a document from Cosmos using my credentials. However, I'm able to read and write documents using the Azure Portal. Now if I add the role to my principal, the function is allowed to run locally successfully. Why?
Forbidden (403); Reason: (Request blocked by Auth
cosmos-pocif-dev-wus2-1 : Request is blocked because principal
[4eaac860-308b-4a42-b70e-f727181e69d8] does not have required RBAC
permissions to perform action
[Microsoft.DocumentDB/databaseAccounts/readMetadata] on resource.
I found the recent reported issue in MS Q&A Azure Cosmos DB Tagged Forum with the same error while reading-from and writing the data to the Cosmos Database - #802755
but your source is Azure Functions and here the user's source is ADF.
ErrorMessage: Request blocked by AuthcosmosDB: Request is because principal [xyzx-abcd-xxx] does not have required RBAC permissions to perform action.
An MSFT User #PradeepCheekatla-MSFT provided the solution that because of insufficient RBAC permissions on [Microsoft.DocumentDB/databaseAccounts/readMetadata] and requires the Service principal level access and has given the process of resolving the issue is that service principal gets assigned with the Cosmos DB Data Roles such as Reader and Contributor.

Failed to access the Azure Dedicated SQL pool with the given credentials

Our organization having an Azure Synapse Dedicated Pool instance. I am trying to register the Azure Synapse Dedicated Pool with Azure Purview and want to scan the Synapse DB. However, I am getting the following Error every time:
“Failed to access the Azure Dedicated SQL pool with the given credentials”
Following are the process I followed to Register the Data Source:
I opened “Purview Studio”
There I have created a “Collection”
Then I go to “Register Sources”
Then I search for “Azure Synapse Dedicated Pool”
Then I select the subscription where my Azure Synapse Dedicated Pool is present
Then I Registered my Data Source
Now I am trying to create a New Scan for my Synapse Dedicated Pool
The problem starts from here, First of all I selected the subscription, then I selected the resource group and then I selected the Synapse DB name. I tried two authentication methods to authenticate my Synapse Instance. First one is Purview MSI account and second one is SQL Authentication. I have added my Purview MSI account as a user in Synapse Dedicated pool using following command.
CREATE USER [PurviewAccountName] FROM EXTERNAL PROVIDER
GO
EXEC sp_addrolemember 'db_datareader', [PurviewAccountName]
GO
Now I tried to test the connection but it is not working and giving me following Error:
“Failed to access the Azure Dedicated SQL pool with Purview MSI account”
My Azure Synapse Dedicated Pool instance in not publically accessible, we have put it behind the private link. I can connect my Azure Synapse Instance using VPN connectivity on my machine and login through SSMS and Azure Data Studio.
I also tried with SQL authentication by using SQL username and Password which is kept under the keyvault. I have checked it multiple times and I am confident I have configured it correctly. But still when I try to test the connection. It is showing following error:
“Failed to access the Azure Dedicated SQL pool with the given credentials”
Some where I have read I need self-hosted-integration runtime if the Azure Synapse instance is behind private link.
So I installed integration runtime on my machine, configure it and tested for the Synapse connection with SQL Authentication by connecting to VPN. Self-Hosted IR configured successfully. I tested with both the IR. Azure IR and Self-hosted-IR. But no luck, I am getting the same error.
I have also added Purview MSI account to Access Policy in keyVault and provided GET, List permission on keys and Secrets.
However, I am not getting what I am missing here and why it is giving me the same error.
Any help on this is really means a lot me..
CREATE USER [PurviewAccountName] FROM EXTERNAL PROVIDER
GO
EXEC sp_addrolemember 'db_datareader', [PurviewAccountName]
GO
According to Microsoft official documentation, to execute the above command one must be Azure Synapse Administrator in the workspace. It is alsi required that your purview account name must have reader role set which can be done from Access Control (IAM) under the Azure Synapse Workspace resource.
To create SQL Pools, Apache Spark Pools and Integration Runtimes, users must have at least Azure Contributor role in the workspace. The contributor role also allows these users to manage the resources, including pausing and scaling. If you're- using Azure Portal or Synapse Studio to create SQL Pools, Apache Spark Pools and INtegration Runtimes, then you need Azure Contributor role at the resource group level.
To GRANT access to a Dedicated SQL Pool database, the scripts can be run by the workspace creator or any member of the workspace1_SynapseAdministrators group.
Follow the below steps in the Azure Synapse SQL script editor:
Create the USER in the database by running the following command on the target database, selected using the Connect to dropdown:
CREATE USER [<alias#domain.com>] FROM EXTERNAL PROVIDER;
Grant a user a role to access the database
EXEC sp_addrolemember 'db_owner', '<alias#domain.com>'

Using Azure SQL Migration extension on Azure Data Studio

I have connected my azure account in Data Studio and I am using Azure SQL migration extension (v0.1.12) to migrate on-prem SQL to Azure Managed Instance.
However my subscription details are not getting fetched.
Screen Shot Attached Here
When I manually add Azure Subscription details I am getting following error
Manually Entered Details
And the error message Error
The issue seems to be more of access level issues.
Below are the type of access levels that you need to have for creating Azure Migrate Appliance project
Contributor or Owner permissions in the Azure subscription.
Permissions to register Azure Active Directory (Azure AD) apps.
Owner or Contributor and User Access Administrator permissions in the Azure subscription to create an instance of Azure Key Vault, which is used during agentless server migration.
Below are the steps to set contributor or Owner permissions
From Azure Subscriptions panel select the subscription
Move to Access Control IAM and select Add role Assignment
Assign the following roles.
For complete information check the Microsoft Document on providing access.

Access issue with Azure Synapse studio

I created a Synapse workspace in my Azure Portal and tried opening the Synapse studio and I received the following error:
Failed to load one or more resources due to No access, error code 403.
credential
linkedService
dataset
pipeline
trigger
sqlscript
notebook
sparkjobdefinition
dataflow
What could be the reason. I believe I have required access to resource groups
This could be an intermittent issue while opening synapse workspace.
Could you please confirm the permission on the Synapse workspace which you are trying to login?
Make sure you have required permissions to access workspace:
From Azure Portal under Synapse Workspace, user needs to have Owner/Contributor permission
From Azure Portal under Synapse Workspace, user needs to enable correct IP address under firewall settings
Option1: Try to manually login by going to the https://web.azuresynapse.net and sign into your workspace.
For more information, refer to the Open Synapse Studio
Option2: You please try the below:
Clear “Cookies and Cached data” of your browser.
Private Mode (New InPrivate Window).
Try in different browser.
I had this issue and I was able to solve it by doing the following:
Open Synapse Studio from Overview screen in Synapse
Click Manage from the left navigation blade
Click on Access Control in Security
Click Add and then Select the Role "Synapse Administrator"
Select the User permission should be given to
Select Apply
After that, log out and log back to Azure and the error should disappear.
In case you still see the error then you need to access to the Synapse workspace and under the Security tab you need to click on it and add the range of IP addresses that will have access to the instance.
Go to your storage account -> Access Control (IAM) -> Role Assigments and check if you can find ther role storage-blob-data-contributor if not add it.
This role shoulde be added automaticly but there are exceptions fron this rule
Detials are here how-to-grant-workspace-managed-identity-permissions
I managed to fix the same issue by following these steps:
Open "Azure Synapse Studio" with your admin account from the Workspace,
Open Manage\Access Control\ and add the user you need with Role Synapse Administrator or more adequate privilege.
Sign Out "Azure Synapse Studio"
Sign In with the other user that you just gave privilege to.
We also experienced the same error message but it was caused by improper configuration of private endpoints. If you are using private endpoints, you need four of them: one for the Azure Synapse Private Link Hub and three for the workspace sub-resources (SQL, SqlOnDemand, and Dev).
Once we corrected the issue this error went away for us and Studio behaves normally now.
So as the other answers point out, this can be caused by missing RBAC roles or by networking issues.
As per abautista this was the fix for me:
Synapse Studio >> Manage >> Access Control in Security >> Add yourself as the Role "Synapse Administrator"

Failed to create an app in Azure Active Directory. Error: Insufficient privileges to complete the operation

I am trying to setup Azure DevOps 'Release' Pipeline, when I am trying to add Azure Resource Manager service Connection, I am getting error like 'Failed to create an app in Azure Active Directory. Error: Insufficient privileges to complete the operation. For troubleshooting refer to link. '
My Organization assigned me an Azure Professional Subscription account. When I click the Active Directory, I am getting error like 'Access denied. You do not have access. Looks like you don't have access to this content. To get access, please contact the owner.'
What sort of user role, the organization needs to assign to me so that I can setup the Azure DevOps Release Pipeline.
The company can't give me the role as global administrator or user account administrator to ADFS, because of security reason. What is the appropriate ADFS user role permission my company should assign to me ?
There's no way to do this without being a Global Admin or Owner on the Azure Active Directory tenant. You need to request access from your organization or else make your own account with your own subscription and publish the application there.
You need to have the Application Administrator role in the AD in order to create the service connections.
After, enabling the Application Administrator role from the Azure Active Directory roles, I was able to create the service connection properly.
We are trying to create a service connection named, xyz-serviceconn-verify. Without any error message, now I could create service connections.
Here, you could see the created service connection, xyz-serviceconn-verify.
Good Luck :)
See the link, last error
https://learn.microsoft.com/en-us/azure/devops/pipelines/release/azure-rm-endpoint?view=azure-devops&viewFallbackFrom=vsts
This error is coming because you do not have sufficient privileges in your AAD, you do not have Write permission for the selected Azure subscription when the system attempts to assign the Contributor role.
It worked for me when I tried to create my own new AD, and then I move the subscriptions I got from the company to this AD (it is just for dev and test).
If you want it to work on production, maybe you should ask the administrator to create a new app registration for you and he should grant all permission to you inside this app (I guess).
Best regards,
Tai.

Resources