What is TokenResource value for Azure Data Box Gateway for AAD Authentication using .Net SDK?

Ravishankar Boyina 21 Reputation points Microsoft Employee
2021-02-19T15:18:52.843+00:00

Hi All,

I am trying to access Azure Data Box Gateway using Azure .Net SDK.
I need to generate access token for AAD Auth to ADBG azure resource.
For generating access token I need the value of tokenresource value.

Can anyone guide me what would be token resource value in this case?

I am using IAuthConfigurationProvider interface and AuthTokenProvider class for access token generation.

namespace Microsoft.Manufacturing.Core.Web.HttpAccess.ActiveDirectory
{
public interface IAuthConfigurationProvider
{
string AuthenticationURL { get; }
string ClientCredentialId { get; }
string ClientCredentialSecret { get; }
string TokenResource { get; }
}
}

namespace Microsoft.Manufacturing.Core.Web.HttpAccess.ActiveDirectory
{
public sealed class AuthTokenProvider : IAuthTokenProvider
{
public AuthTokenProvider(IAuthConfigurationProvider configSettings);

    [AsyncStateMachine(typeof(<GetTokenAsync>d__2))]
    public Task<string> GetTokenAsync();
}

}

Thanks,
Ravi.

Azure Data Box
Azure Data Box
A family of appliances and solutions for offline data transfer to Azure​.
42 questions
{count} votes

Accepted answer
  1. deherman-MSFT 37,416 Reputation points Microsoft Employee
    2021-02-22T17:00:19.093+00:00

    @Ravishankar Boyina
    Thanks for providing those additional details. I reached out to the product team and confirmed that AAD is not currently support for Azure Data Box Gateway. This is something that they are planning to implement but unfortunately I cannot provide an ETA currently.

    -------------------------------

    Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ravishankar Boyina 21 Reputation points Microsoft Employee
    2021-02-20T04:43:33.95+00:00

    I couldnt find the documentation using .net sdk but i have below rest api doc. I had figured it out from github azure .net sdk test classes.

    https://learn.microsoft.com/en-us/rest/api/databoxedgegateway/shares/refresh

    I found the value for TokenResoure => https://management.azure.com/

    Now I am able to generate access token but now I am getting authorize error.

    Exception : "Does not have authorization to perform action 'Microsoft.DataBoxEdge/dataBoxEdgeDevices/shares/read' over scope"

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.